(select): 优化 disabled 属性启用时将不再显示 allow-clear 操作, 本次变动涉及 input tag-input select 组件

This commit is contained in:
就眠儀式 2022-11-02 10:44:10 +08:00
parent 1755e0e3a8
commit 2a5bd7d1fc
3 changed files with 4 additions and 4 deletions

View File

@ -175,7 +175,7 @@ const showPassword = () => {
<password-icon v-if="isPassword"></password-icon>
<un-password-icon v-else></un-password-icon>
</span>
<span class="layui-input-clear" v-if="allowClear && hasContent">
<span class="layui-input-clear" v-if="allowClear && hasContent && !disabled">
<lay-icon type="layui-icon-close-fill" @click.stop="onClear"></lay-icon>
</span>
<span class="layui-input-suffix" v-if="slots.suffix || props.suffixIcon">

View File

@ -319,7 +319,7 @@ defineExpose({
/>
</template>
</span>
<span v-if="allowClear && tagData?.length" class="layui-tag-input-clear">
<span v-if="allowClear && tagData?.length && !disabled" class="layui-tag-input-clear">
<lay-icon type="layui-icon-close-fill" @click.stop="handleClearClick" />
</span>
<span class="layui-tag-input-suffix" v-if="$slots.suffix">

View File

@ -79,12 +79,12 @@ export default {
<template>
<lay-space>
<lay-select v-model="value3" :disabled="true">
<lay-select v-model="value3" :disabled="true" :allow-clear="true">
<lay-select-option value="1" label="学习"></lay-select-option>
<lay-select-option value="2" label="编码"></lay-select-option>
<lay-select-option value="3" label="运动"></lay-select-option>
</lay-select>
<lay-select v-model="value4" :disabled="true" :multiple="true">
<lay-select v-model="value4" :disabled="true" :multiple="true" :allow-clear="true">
<lay-select-option value="1" label="学习"></lay-select-option>
<lay-select-option value="2" label="编码"></lay-select-option>
<lay-select-option value="3" label="运动"></lay-select-option>