优化webConfig和wxmpConfig组件的表单处理逻辑
This commit is contained in:
@@ -113,20 +113,6 @@ export default {
|
||||
{prop: 'category', label: "分类", dict: "appsCategory"},
|
||||
{prop: 'name', label: "模块名"}
|
||||
],
|
||||
tabBar: {
|
||||
color: "#666666",
|
||||
selectedColor: "#197DF0",
|
||||
backgroundColor: "#ffffff",
|
||||
list: [
|
||||
{pagePath: "pages/AppHome/AppHome", text: "首页", iconPath: "static/TabBar/home.png", selectedIconPath: "static/TabBar/home_selected.png"},
|
||||
{pagePath: "pages/AppModules/AppModules", text: "应用", iconPath: "static/TabBar/service.png", selectedIconPath: "static/TabBar/service_selected.png"},
|
||||
{
|
||||
pagePath: "pages/AppEnteringVillage/AppEnteringVillage", text: "进村",
|
||||
iconPath: "static/TabBar/custom.png", selectedIconPath: "static/TabBar/custom_selected.png"
|
||||
},
|
||||
{pagePath: "pages/AppMine/AppMine", text: "我的", iconPath: "static/TabBar/me.png", selectedIconPath: "static/TabBar/me_selected.png"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -11,8 +11,8 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler() {
|
||||
this.$emit("input", this.form)
|
||||
handler(v) {
|
||||
this.$emit("input", v)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ export default {
|
||||
},
|
||||
tabBar: {
|
||||
deep: true, handler(v) {
|
||||
this.tabBar.list = this.tabBar.list.filter(e => !!e.pagePath) || []
|
||||
this.$set(this.form, "tabBar", v)
|
||||
this.$emit("input", {...this.form, tabBar: {...v, list: v.list.filter(e => !!e.pagePath) || []}})
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -52,8 +51,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTabbarChange(row, {id, name, label}) {
|
||||
row.id = id
|
||||
handleTabbarChange(row, {name, label}) {
|
||||
row.text = label
|
||||
row.pagePath = `pages/${name}/${name}`
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user