miniprogram/node_modules/@vant/weapp/lib/tabbar/index.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
var relation_1 = require("../common/relation");
var utils_1 = require("../common/utils");
(0, component_1.VantComponent)({
relation: (0, relation_1.useChildren)('tabbar-item', function () {
this.updateChildren();
}),
props: {
active: {
type: null,
observer: 'updateChildren',
},
activeColor: {
type: String,
observer: 'updateChildren',
},
inactiveColor: {
type: String,
observer: 'updateChildren',
},
fixed: {
type: Boolean,
value: true,
observer: 'setHeight',
},
placeholder: {
type: Boolean,
observer: 'setHeight',
},
border: {
type: Boolean,
value: true,
},
zIndex: {
type: Number,
value: 1,
},
safeAreaInsetBottom: {
type: Boolean,
value: true,
},
},
data: {
height: 50,
},
methods: {
updateChildren: function () {
var children = this.children;
if (!Array.isArray(children) || !children.length) {
return;
}
children.forEach(function (child) { return child.updateFromParent(); });
},
setHeight: function () {
var _this = this;
if (!this.data.fixed || !this.data.placeholder) {
return;
}
后面还有 8 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
