优化webConfig和wxmpConfig组件的表单处理逻辑
This commit is contained in:
@@ -113,20 +113,6 @@ export default {
|
|||||||
{prop: 'category', label: "分类", dict: "appsCategory"},
|
{prop: 'category', label: "分类", dict: "appsCategory"},
|
||||||
{prop: 'name', label: "模块名"}
|
{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: {
|
methods: {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
form: {
|
form: {
|
||||||
handler() {
|
handler(v) {
|
||||||
this.$emit("input", this.form)
|
this.$emit("input", v)
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tabBar: {
|
tabBar: {
|
||||||
deep: true, handler(v) {
|
deep: true, handler(v) {
|
||||||
this.tabBar.list = this.tabBar.list.filter(e => !!e.pagePath) || []
|
this.$emit("input", {...this.form, tabBar: {...v, list: v.list.filter(e => !!e.pagePath) || []}})
|
||||||
this.$set(this.form, "tabBar", v)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -52,8 +51,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTabbarChange(row, {id, name, label}) {
|
handleTabbarChange(row, {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