fix(components): [cascader] form nested causing clear icon invalid (#16068)

This commit is contained in:
btea 2024-03-12 21:52:51 +08:00 committed by GitHub
parent 442a4627a1
commit a8e622bac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -69,7 +69,14 @@
</template>
</el-input>
<div v-if="multiple" ref="tagWrapper" :class="nsCascader.e('tags')">
<div
v-if="multiple"
ref="tagWrapper"
:class="[
nsCascader.e('tags'),
nsCascader.is('validate', Boolean(validateState)),
]"
>
<el-tag
v-for="tag in presentTags"
:key="tag.key"
@ -326,6 +333,8 @@ const presentText = computed(() => {
: ''
})
const validateState = computed(() => formItem?.validateState || '')
const checkedValue = computed<CascaderValue>({
get() {
return cloneDeep(props.modelValue) as CascaderValue

View File

@ -144,6 +144,10 @@
text-align: left;
box-sizing: border-box;
@include cascader-tag-normal(getCssVar('cascader-tag-background'));
&.is-validate {
right: 55px;
}
}
@include e(collapse-tags) {