This commit is contained in:
yanran200730
2021-12-30 13:53:05 +08:00
parent 03a01aaf0e
commit c91df9daf5
3 changed files with 14 additions and 10 deletions

View File

@@ -184,6 +184,7 @@ export default {
})
uni.$on('filedConfig', res => {
console.log(res)
if (res.index < 0) {
this.targetList.push(res.config)
} else {
@@ -191,6 +192,11 @@ export default {
}
})
},
onShow () {
localStorage.removeItem("toFiledConfig")
},
methods: {
toSetting() {
let {formConfig} = this
@@ -348,13 +354,10 @@ export default {
if (index > -1) {
this.filed = type
this.filedIndex = index
let {filed, filedType} = this
localStorage.setItem("toFiledConfig", JSON.stringify({index, filed, filedType}))
localStorage.setItem("toFiledConfig", JSON.stringify({index, filed: type, filedType: type.type}))
} else {
this.filedIndex = ''
this.filedType = type
let {filed, filedType} = this
localStorage.setItem("toFiledConfig", JSON.stringify({filed, filedType}))
localStorage.setItem("toFiledConfig", JSON.stringify({filed: '', filedType: type, index: -1}))
}
uni.navigateTo({url: `./FiledConfig`})
},