26179
This commit is contained in:
@@ -184,6 +184,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
uni.$on('filedConfig', res => {
|
uni.$on('filedConfig', res => {
|
||||||
|
console.log(res)
|
||||||
if (res.index < 0) {
|
if (res.index < 0) {
|
||||||
this.targetList.push(res.config)
|
this.targetList.push(res.config)
|
||||||
} else {
|
} else {
|
||||||
@@ -191,6 +192,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onShow () {
|
||||||
|
localStorage.removeItem("toFiledConfig")
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toSetting() {
|
toSetting() {
|
||||||
let {formConfig} = this
|
let {formConfig} = this
|
||||||
@@ -348,13 +354,10 @@ export default {
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.filed = type
|
this.filed = type
|
||||||
this.filedIndex = index
|
this.filedIndex = index
|
||||||
let {filed, filedType} = this
|
localStorage.setItem("toFiledConfig", JSON.stringify({index, filed: type, filedType: type.type}))
|
||||||
localStorage.setItem("toFiledConfig", JSON.stringify({index, filed, filedType}))
|
|
||||||
} else {
|
} else {
|
||||||
this.filedIndex = ''
|
this.filedIndex = ''
|
||||||
this.filedType = type
|
localStorage.setItem("toFiledConfig", JSON.stringify({filed: '', filedType: type, index: -1}))
|
||||||
let {filed, filedType} = this
|
|
||||||
localStorage.setItem("toFiledConfig", JSON.stringify({filed, filedType}))
|
|
||||||
}
|
}
|
||||||
uni.navigateTo({url: `./FiledConfig`})
|
uni.navigateTo({url: `./FiledConfig`})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -148,12 +148,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
let params = localStorage.getItem("toFiledConfig")
|
let params = localStorage.getItem("toFiledConfig")
|
||||||
params && (params = JSON.parse(params))
|
params && (params = JSON.parse(params))
|
||||||
localStorage.removeItem("toFiledConfig")
|
params.config = params.index > -1 ? params.filed : components.filter(v => v.type === params.filedType)[0]
|
||||||
params.config = params.index > -1 ? params.filed : components?.filter(v => v.type === params.filedType)?.[0] || {}
|
|
||||||
return {
|
return {
|
||||||
...params,
|
...params,
|
||||||
isShowType: false,
|
isShowType: false,
|
||||||
isShowAnswer: false,
|
isShowAnswer: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
history.go(2 - history.length)
|
uni.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|||||||
Reference in New Issue
Block a user