fix:组件修改名称后更新表达式中数据集的名称

main
liu.shiyi 1 year ago
parent 62598cd649
commit f8fcc8f2e6

@ -176,13 +176,6 @@ export default {
}
},
watch: {
//
'config.title': {
handler (val, oldVal) {
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
}
}
},
mounted () {},
methods: {

@ -173,13 +173,6 @@ export default {
}
},
watch: {
//
'config.title': {
handler (val, oldVal) {
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
}
}
},
mounted () {},
methods: {

@ -25,6 +25,13 @@ export default {
this.getDataByExpression(this.config)
}
},
// 标题发生变化时需要及时更新表达式中的数据集库的字段名
'config.title': {
handler (val, oldVal) {
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
}
},
currentDataset: { // 关联的数据发生变化
handler (val, old) {
if (val && Object.keys(val).length && JSON.stringify(val) !== JSON.stringify(old)) {

Loading…
Cancel
Save