From 45455afcc956211485f7c6599ad3b1c7674c873c Mon Sep 17 00:00:00 2001 From: qianming Date: Sat, 31 Jul 2021 15:37:26 +0800 Subject: [PATCH] update --- .../report/bigscreen/designer/widget/widgetMarquee.vue | 10 +++------- .../report/bigscreen/designer/widget/widgetText.vue | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widgetMarquee.vue b/report-ui/src/views/report/bigscreen/designer/widget/widgetMarquee.vue index 9fccd667..4c9ea4c0 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetMarquee.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetMarquee.vue @@ -65,13 +65,9 @@ export default { // 数据解析 setOptionsData() { const optionsData = this.optionsData; // 数据类型 静态 or 动态 - optionsData.dataType == "staticData" - ? this.staticDataFn(optionsData.staticData) - : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); - }, - staticDataFn(val) { - this.styleColor.text = val; - this.$forceUpdate(); + if (optionsData.dataType == "dynamicData") { + this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); + } else {}; }, dynamicDataFn(val, refreshTime) { if (!val) return; diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widgetText.vue b/report-ui/src/views/report/bigscreen/designer/widget/widgetText.vue index 12ba5fac..95b59718 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetText.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetText.vue @@ -63,13 +63,9 @@ export default { // 数据解析 setOptionsData() { const optionsData = this.optionsData; // 数据类型 静态 or 动态 - optionsData.dataType == "staticData" - ? this.staticDataFn(optionsData.staticData) - : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); - }, - staticDataFn(val) { - this.styleColor.text = val; - this.$forceUpdate(); + if (optionsData.dataType == "dynamicData") { + this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); + } else {}; }, dynamicDataFn(val, refreshTime) { if (!val) return;