|
@@ -10,7 +10,7 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import {eventBus} from "@/utils/eventBus";
|
|
|
|
|
|
+import { eventBus } from "@/utils/eventBus";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "WidgetSelect",
|
|
name: "WidgetSelect",
|
|
@@ -24,17 +24,20 @@ export default {
|
|
optionsStyle: {},
|
|
optionsStyle: {},
|
|
optionsData: {},
|
|
optionsData: {},
|
|
optionsSetup: {},
|
|
optionsSetup: {},
|
|
- options:{}
|
|
|
|
|
|
+ options: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
styleObj() {
|
|
styleObj() {
|
|
|
|
+ console.log(this.optionsSetup);
|
|
return {
|
|
return {
|
|
position: this.ispreview ? "absolute" : "static",
|
|
position: this.ispreview ? "absolute" : "static",
|
|
width: this.optionsStyle.width + "px",
|
|
width: this.optionsStyle.width + "px",
|
|
height: this.optionsStyle.height + "px",
|
|
height: this.optionsStyle.height + "px",
|
|
left: this.optionsStyle.left + "px",
|
|
left: this.optionsStyle.left + "px",
|
|
top: this.optionsStyle.top + "px",
|
|
top: this.optionsStyle.top + "px",
|
|
|
|
+ background: this.optionsSetup.select_fontSize,
|
|
|
|
+ color: this.optionsSetup.select_color,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
eventChange() {
|
|
eventChange() {
|
|
@@ -47,7 +50,7 @@ export default {
|
|
this.optionsSetup = val.setup;
|
|
this.optionsSetup = val.setup;
|
|
this.optionsData = val.data;
|
|
this.optionsData = val.data;
|
|
this.optionsStyle = val.position;
|
|
this.optionsStyle = val.position;
|
|
- this.setOptions()
|
|
|
|
|
|
+ this.setOptions();
|
|
},
|
|
},
|
|
deep: true,
|
|
deep: true,
|
|
},
|
|
},
|
|
@@ -56,7 +59,7 @@ export default {
|
|
this.optionsSetup = this.value.setup;
|
|
this.optionsSetup = this.value.setup;
|
|
this.optionsData = this.value.data;
|
|
this.optionsData = this.value.data;
|
|
this.optionsStyle = this.value.position;
|
|
this.optionsStyle = this.value.position;
|
|
- this.setOptions()
|
|
|
|
|
|
+ this.setOptions();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
change(event) {
|
|
change(event) {
|
|
@@ -67,13 +70,13 @@ export default {
|
|
eventBus.$emit("eventParams", params);
|
|
eventBus.$emit("eventParams", params);
|
|
},
|
|
},
|
|
setOptions() {
|
|
setOptions() {
|
|
- const optionsData = this.optionsData;
|
|
|
|
- return optionsData.dataType == "staticData"
|
|
|
|
- ? this.staticData(optionsData.staticData)
|
|
|
|
- : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
|
|
|
|
|
|
+ const optionsData = this.optionsData;
|
|
|
|
+ return optionsData.dataType == "staticData"
|
|
|
|
+ ? this.staticData(optionsData.staticData)
|
|
|
|
+ : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
|
|
},
|
|
},
|
|
staticData(data) {
|
|
staticData(data) {
|
|
- this.options = data
|
|
|
|
|
|
+ this.options = data;
|
|
},
|
|
},
|
|
//动态数据字典解析
|
|
//动态数据字典解析
|
|
dynamicDataFn(val, refreshTime) {
|
|
dynamicDataFn(val, refreshTime) {
|
|
@@ -108,6 +111,11 @@ export default {
|
|
|
|
|
|
.el-input__inner {
|
|
.el-input__inner {
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
+ background: inherit;
|
|
|
|
+ color: inherit;
|
|
|
|
+ &::placeholder {
|
|
|
|
+ color: inherit;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|