forked from github/dataease
feat: 下拉框样式
This commit is contained in:
parent
5af4158dc4
commit
fb53686109
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<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
|
<el-option
|
||||||
v-for="item in options.attrs.datas"
|
v-for="item in options.attrs.datas"
|
||||||
:key="item[options.attrs.key]"
|
:key="item[options.attrs.key]"
|
||||||
@ -28,12 +28,17 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: null,
|
options: null,
|
||||||
operator: 'eq'
|
operator: 'eq',
|
||||||
|
values: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'element.style': function(value) {
|
'options.attrs.multiple': function(value) {
|
||||||
// console.log(value)
|
if (value) {
|
||||||
|
this.values = []
|
||||||
|
} else {
|
||||||
|
this.values = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ const dialogPanel = {
|
|||||||
const drawPanel = {
|
const drawPanel = {
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
style: {
|
style: {
|
||||||
width: 200,
|
width: 300,
|
||||||
height: 22,
|
height: 35,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
lineHeight: '',
|
lineHeight: '',
|
||||||
|
@ -395,7 +395,7 @@ export default {
|
|||||||
|
|
||||||
multipleChange(value) {
|
multipleChange(value) {
|
||||||
// this.componentInfo.options.attrs.multiple = value
|
// this.componentInfo.options.attrs.multiple = value
|
||||||
this.componentInfo.options.value = null
|
// this.componentInfo.options.value = null
|
||||||
this.$emit('re-fresh-component', this.componentInfo)
|
this.$emit('re-fresh-component', this.componentInfo)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user