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