[new feature] TabbarItem: add name prop

This commit is contained in:
陈嘉涵
2019-05-19 18:20:54 +08:00
parent 20bf1f651e
commit a6b60c2a55
8 changed files with 160 additions and 8 deletions

View File

@@ -13,6 +13,7 @@ export default sfc({
...routeProps,
icon: String,
dot: Boolean,
name: [String, Number],
info: [String, Number]
},
@@ -34,7 +35,7 @@ export default sfc({
methods: {
onClick(event) {
this.parent.onChange(this.index);
this.parent.onChange(this.name || this.index);
this.$emit('click', event);
route(this.$router, this);
}