优化wxmpConfig组件tabBar配置更新逻辑
This commit is contained in:
@@ -19,6 +19,11 @@ export default {
|
|||||||
this.$emit("input", this.form)
|
this.$emit("input", this.form)
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
},
|
||||||
|
tabBar: {
|
||||||
|
deep: true, handler(v) {
|
||||||
|
this.$set(this.form, "tabBar", v.filter(e => !!e.pagePath) || [])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -46,7 +51,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTabbarChange(row, {name, label}) {
|
handleTabbarChange(row, {id, name, label}) {
|
||||||
|
row.id = id
|
||||||
row.text = label
|
row.text = label
|
||||||
row.pagePath = `pages/${name}/${name}`
|
row.pagePath = `pages/${name}/${name}`
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user