mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[new feature] TabbarItem: add name prop
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user