select 改变颜色

qianlishi 2 years ago
parent 9ba35a1a6c
commit 6f5161a828

@ -3,7 +3,7 @@
* @Author: qianlishi qianlishi@anji-plus.com
* @Date: 2023-01-09 13:02:59
* @LastEditors: qianlishi qianlishi@anji-plus.com
* @LastEditTime: 2023-01-12 16:44:50
* @LastEditTime: 2023-03-06 15:33:39
*/
export const widgetSelect = {
@ -33,7 +33,7 @@ export const widgetSelect = {
{
type: 'vue-color',
label: '字体颜色',
name: 'color',
name: 'select_color',
required: false,
placeholder: '',
value: '#FAD400',
@ -41,7 +41,7 @@ export const widgetSelect = {
{
type: 'vue-color',
label: '字体背景',
name: 'background',
name: 'select_fontSize',
required: false,
placeholder: '',
value: 'rgba(115,170,229,.5)',

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

Loading…
Cancel
Save