diff --git a/frontend/src/components/ElVisualSelect/index.vue b/frontend/src/components/ElVisualSelect/index.vue
index eeda732b70..4308dd42cf 100644
--- a/frontend/src/components/ElVisualSelect/index.vue
+++ b/frontend/src/components/ElVisualSelect/index.vue
@@ -12,8 +12,8 @@
@change="visualChange"
@visible-change="popChange"
>
-
{{ $t('dataset.check_all') }}
-
+ {{ $t('dataset.check_all') }}
+
@@ -98,14 +98,14 @@ export default {
})
},
keyWord(val, old) {
- if(val === old) return
+ if (val === old) return
const results = val ? this.list.filter(item => item.text.includes(val)) : null
this.resetList(results)
this.reCacularHeight()
this.$nextTick(() => {
this.callback()
})
- },
+ }
},
mounted() {
this.resetList()
@@ -116,13 +116,16 @@ export default {
methods: {
setSelect(id) {
if (Array.isArray(this.selectValue)) {
- return this.selectValue.map( ele => ele.id ).includes(id) && 'selected'
+ return this.selectValue.map(ele => ele.id).includes(id) && 'selected'
}
- return this.selectValue === id && 'selected';
+ return this.selectValue === id && 'selected'
},
selectAllChane(val) {
- this.visualChange(val ? [...this.list.map( ele => ele.id )] : [])
- this.$emit('handleShowNumber');
+ const vals = val ? [...this.list.map(ele => ele.id)] : []
+ this.visualChange(vals)
+ this.selectValue = vals
+ this.$emit('change', vals)
+ this.$emit('handleShowNumber')
},
addScrollDiv(selectDom) {
this.maxHeightDom = document.createElement('div')
@@ -144,9 +147,9 @@ export default {
this.options = this.newList.slice(0, this.maxLength)
},
customInputStyle() {
- if (!this.$parent.$parent.handlerInputStyle) return;
+ if (!this.$parent.$parent.handlerInputStyle) return
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-input__inner'), this.$parent.element.style)
- handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-select__input'), {wordColor: this.$parent.element.style.wordColor})
+ handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-select__input'), { wordColor: this.$parent.element.style.wordColor })
},
init() {
if (this.defaultFirst && this.list.length > 0) {
@@ -193,8 +196,8 @@ export default {
this.reCacularHeight()
},
visualChange(val) {
- if(this.$attrs.multiple) {
- this.selectAll = val.length === this.list.length;
+ if (this.$attrs.multiple) {
+ this.selectAll = val.length === this.list.length
}
this.$emit('visual-change', val)
}
diff --git a/frontend/src/components/widget/DeWidget/DeSelect.vue b/frontend/src/components/widget/DeWidget/DeSelect.vue
index ce3aac9589..4f1feeacda 100644
--- a/frontend/src/components/widget/DeWidget/DeSelect.vue
+++ b/frontend/src/components/widget/DeWidget/DeSelect.vue
@@ -16,7 +16,7 @@
:key-word="keyWord"
popper-class="coustom-de-select"
:list="datas"
- :customStyle="customStyle"
+ :custom-style="customStyle"
@change="changeValue"
@focus="setOptionWidth"
@blur="onBlur"
@@ -108,7 +108,7 @@ export default {
return this.$store.state.panel.panelInfo
},
customStyle() {
- const { brColor, wordColor, innerBgColor } = this.element.style;
+ const { brColor, wordColor, innerBgColor } = this.element.style
return { brColor, wordColor, innerBgColor }
}
},
@@ -257,7 +257,7 @@ export default {
}
},
visualChange(value) {
- this.value = value;
+ this.value = value
this.$nextTick(() => {
if (!this.element.options.attrs.multiple) {
return