优化wxmpConfig组件tabBar配置更新逻辑

This commit is contained in:
aixianling
2024-11-27 17:55:08 +08:00
parent eee06c837d
commit 3316b73450

View File

@@ -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}`
}, },