仿互站小程序
This commit is contained in:
29
vant/tabbar-item/index.js
Normal file
29
vant/tabbar-item/index.js
Normal file
@@ -0,0 +1,29 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
props: {
|
||||
info: null,
|
||||
icon: String,
|
||||
dot: Boolean
|
||||
},
|
||||
relation: {
|
||||
name: "tabbar",
|
||||
type: "ancestor",
|
||||
linked: function(t) {
|
||||
this.parent = t;
|
||||
}
|
||||
},
|
||||
data: {
|
||||
active: !1
|
||||
},
|
||||
methods: {
|
||||
onClick: function() {
|
||||
this.parent && this.parent.onChange(this), this.$emit("click");
|
||||
},
|
||||
setActive: function(t) {
|
||||
var e = t.active, n = t.color;
|
||||
return this.data.active !== e ? this.set({
|
||||
active: e,
|
||||
color: n
|
||||
}) : Promise.resolve();
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user