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) const result = new Function('dataset', 'computedDatas', this.config.expression)
config.customize.title = result(this.dataset, this.computedDatas) 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) { dataFormatting (config, data) {
// //

@ -179,10 +179,8 @@ export default {
// //
'config.title': { 'config.title': {
handler (val, oldVal) { handler (val, oldVal) {
if (val) { this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal }) this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal })
}
} }
} }
}, },

@ -176,10 +176,8 @@ export default {
// //
'config.title': { 'config.title': {
handler (val, oldVal) { handler (val, oldVal) {
if (val) { this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateDataset({ code: this.config.code, title: val, data: [], oldTitle: oldVal }) this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal, isChangeTitle: true })
this.updateComputedDatas({ code: this.config.code, title: val, data: [], oldTitle: oldVal })
}
} }
} }
}, },

Loading…
Cancel
Save