feat: 下拉框样式

This commit is contained in:
fit2cloud-chenyw 2021-04-19 15:53:26 +08:00
parent 5af4158dc4
commit fb53686109
3 changed files with 12 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template>
<el-select v-if="options!== null && options.attrs!==null" v-model="options.value" :multiple="options.attrs.multiple" :style="element.style" :placeholder="options.attrs.placeholder" @change="changeValue">
<el-select v-if="options!== null && options.attrs!==null" v-model="values" :multiple="options.attrs.multiple" :placeholder="options.attrs.placeholder" @change="changeValue">
<el-option
v-for="item in options.attrs.datas"
:key="item[options.attrs.key]"
@ -28,12 +28,17 @@ export default {
data() {
return {
options: null,
operator: 'eq'
operator: 'eq',
values: null
}
},
watch: {
'element.style': function(value) {
// console.log(value)
'options.attrs.multiple': function(value) {
if (value) {
this.values = []
} else {
this.values = null
}
}
},

View File

@ -27,8 +27,8 @@ const dialogPanel = {
const drawPanel = {
type: 'custom',
style: {
width: 200,
height: 22,
width: 300,
height: 35,
fontSize: 14,
fontWeight: 500,
lineHeight: '',

View File

@ -395,7 +395,7 @@ export default {
multipleChange(value) {
// this.componentInfo.options.attrs.multiple = value
this.componentInfo.options.value = null
// this.componentInfo.options.value = null
this.$emit('re-fresh-component', this.componentInfo)
},