fix:优化表达式问题

main
liu.shiyi 1 year ago
parent 1d7429f541
commit cbbad64652

@ -42,7 +42,7 @@ export default {
const result = new Function('dataset', 'computedDatas', this.config.expression)
config.customize.title = result(this.dataset, this.computedDatas)
//
this.updateComputedDatas({ code: config.code, title: config.title, data: config.customize.title, isExpression: true })
this.updateComputedDatas({ code: config.code, title: config.title, data: config.customize.title })
},
dataFormatting (config, data) {
//

@ -179,10 +179,8 @@ export default {
//
'config.title': {
handler (val, oldVal) {
if (val) {
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: 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 })
}
}
},

@ -176,10 +176,8 @@ export default {
//
'config.title': {
handler (val, oldVal) {
if (val) {
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: 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 })
}
}
},

Loading…
Cancel
Save