qianming 3 years ago
parent 9150313515
commit 45455afcc9

@ -65,13 +65,9 @@ export default {
// //
setOptionsData() { setOptionsData() {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
optionsData.dataType == "staticData" if (optionsData.dataType == "dynamicData") {
? this.staticDataFn(optionsData.staticData) this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); } else {};
},
staticDataFn(val) {
this.styleColor.text = val;
this.$forceUpdate();
}, },
dynamicDataFn(val, refreshTime) { dynamicDataFn(val, refreshTime) {
if (!val) return; if (!val) return;

@ -63,13 +63,9 @@ export default {
// //
setOptionsData() { setOptionsData() {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
optionsData.dataType == "staticData" if (optionsData.dataType == "dynamicData") {
? this.staticDataFn(optionsData.staticData) this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); } else {};
},
staticDataFn(val) {
this.styleColor.text = val;
this.$forceUpdate();
}, },
dynamicDataFn(val, refreshTime) { dynamicDataFn(val, refreshTime) {
if (!val) return; if (!val) return;

Loading…
Cancel
Save