This commit is contained in:
花有清香月有阴
2021-12-31 11:11:56 +08:00
5 changed files with 16 additions and 20 deletions

View File

@@ -192,11 +192,6 @@ export default {
} }
}) })
}, },
onShow () {
localStorage.removeItem("toFiledConfig")
},
methods: { methods: {
toSetting() { toSetting() {
let {formConfig} = this let {formConfig} = this

View File

@@ -146,9 +146,12 @@ import {components} from './components/config'
export default { export default {
data() { data() {
let params = localStorage.getItem("toFiledConfig") let params = localStorage.getItem("toFiledConfig") || {}
params && (params = JSON.parse(params)) if (params) {
params.config = params.index > -1 ? params.filed : components.filter(v => v.type === params.filedType)[0] params = JSON.parse(params)
params.config = params.index > -1 ? params.filed : JSON.parse(JSON.stringify(components.filter(v => v.type === params.filedType)[0]))
localStorage.removeItem("toFiledConfig")
}
return { return {
...params, ...params,
isShowType: false, isShowType: false,

View File

@@ -192,11 +192,6 @@ export default {
} }
}) })
}, },
onShow () {
localStorage.removeItem("toFiledConfig")
},
methods: { methods: {
toSetting() { toSetting() {
let {formConfig} = this let {formConfig} = this

View File

@@ -146,9 +146,12 @@ import {components} from './components/config'
export default { export default {
data() { data() {
let params = localStorage.getItem("toFiledConfig") let params = localStorage.getItem("toFiledConfig") || {}
params && (params = JSON.parse(params)) if (params) {
params.config = params.index > -1 ? params.filed : components.filter(v => v.type === params.filedType)[0] params = JSON.parse(params)
params.config = params.index > -1 ? params.filed : JSON.parse(JSON.stringify(components.filter(v => v.type === params.filedType)[0]))
localStorage.removeItem("toFiledConfig")
}
return { return {
...params, ...params,
isShowType: false, isShowType: false,