🐛(component): 修复 select 组件 allow-clear 属性为非必填
This commit is contained in:
parent
4ced58ca35
commit
19b1dd5c88
@ -31,7 +31,7 @@ export interface LaySelectProps {
|
|||||||
keyword: string;
|
keyword: string;
|
||||||
}[];
|
}[];
|
||||||
size?: "lg" | "md" | "sm" | "xs";
|
size?: "lg" | "md" | "sm" | "xs";
|
||||||
allowClear: boolean;
|
allowClear?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectRef = shallowRef<undefined | HTMLElement>(undefined);
|
const selectRef = shallowRef<undefined | HTMLElement>(undefined);
|
||||||
|
@ -42,9 +42,10 @@
|
|||||||
.layui-textarea::-webkit-input-placeholder {
|
.layui-textarea::-webkit-input-placeholder {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
.layui-texterea-show-count {
|
.layui-texterea-count {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
margin-top: 4px;
|
||||||
}
|
}
|
@ -84,7 +84,7 @@ const wordCount = computed(() => {
|
|||||||
<span class="layui-textarea-clear" v-if="allowClear && hasContent">
|
<span class="layui-textarea-clear" v-if="allowClear && hasContent">
|
||||||
<lay-icon type="layui-icon-close-fill" @click="onClear"></lay-icon>
|
<lay-icon type="layui-icon-close-fill" @click="onClear"></lay-icon>
|
||||||
</span>
|
</span>
|
||||||
<div v-if="showCount" class="layui-texterea-show-count">
|
<div v-if="showCount" class="layui-texterea-count">
|
||||||
{{ wordCount }}
|
{{ wordCount }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user