fix: 多选组件深色背景下全部为白色,建议优化

This commit is contained in:
dataeaseShu 2023-11-03 12:01:47 +08:00
parent 11743009b9
commit 830fb029bb
3 changed files with 14 additions and 3 deletions

View File

@ -22,7 +22,8 @@
v-customStyle="customStyle"
:indeterminate="isIndeterminate"
@change="selectAllChange"
>{{ $t('dataset.check_all') }}
>
<span :style="{ color: `${isConfig ? '#1F2329' : customStyle.wordColor} !important`}">{{ $t('dataset.check_all') }}</span>
</el-checkbox>
</p>
<el-option
@ -39,7 +40,6 @@
<script>
import { handlerInputStyle } from '@/components/widget/deWidget/serviceNameFn.js'
import { uuid } from 'vue-uuid'
export default {
@ -69,6 +69,10 @@ export default {
type: [String, Number, Array],
default: ''
},
isConfig: {
type: Boolean,
default: false
},
keyWord: {
type: String,
default: ''
@ -181,7 +185,7 @@ export default {
this.options = this.newList.slice(0, this.maxLength)
},
customInputStyle() {
if (!this.$parent.$parent.handlerInputStyle || !this.$refs.visualSelect) return
if (!this.$parent.$parent.handlerInputStyle || !this.$refs.visualSelect || this.isConfig) 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 })
},

View File

@ -16,6 +16,7 @@
:key-word="keyWord"
popper-class="coustom-de-select"
:list="data"
:is-config="isConfig"
@resetKeyWords="filterMethod"
:custom-style="customStyle"
@change="changeValue"
@ -66,6 +67,10 @@ export default {
type: Boolean,
default: true
},
isConfig: {
type: Boolean,
default: false
},
inScreen: {
type: Boolean,
required: false,
@ -274,6 +279,7 @@ export default {
// this.onFocus = false
},
handleElTagStyle() {
if (this.isConfig) return
setTimeout(() => {
this.$refs['deSelect'] && this.$refs['deSelect'].$el && textSelectWidget(this.$refs['deSelect'].$el, this.element.style)
}, 500)

View File

@ -15,6 +15,7 @@
:id="'component' + element.id"
class="component"
:style="element.style"
is-config
:element="element"
:in-draw="false"
/>