(component): update

This commit is contained in:
就眠儀式 2022-09-30 17:32:49 +08:00
parent 954e14bff6
commit c8aafeaa51
4 changed files with 234 additions and 227 deletions

View File

@ -5,6 +5,7 @@
.layui-select {
width: 220px;
cursor: pointer;
.layui-tag-input{
width: 220px;
&-clear{
@ -13,6 +14,10 @@
}
}
.layui-unselect * {
cursor: pointer;
}
.layui-select-content {
max-height: 300px;
padding: 5px 0px;

View File

@ -17,7 +17,7 @@
Component,
watch,
nextTick,
onUnmounted
onUnmounted,
} from "vue";
import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.vue";
@ -90,10 +90,9 @@
getOption(slots.default());
}
Object.assign(options.value, props.items);
}
};
onMounted(() => {
intOption();
timer = setInterval(intOption, 500);
@ -122,7 +121,7 @@
onUnmounted(() => {
clearInterval(timer);
})
});
const selectedValue = computed({
get() {
@ -158,7 +157,7 @@
</script>
<template>
<div class="layui-select layui-unselect">
<div class="layui-select">
<lay-dropdown
:disabled="disabled"
:update-at-scroll="true"
@ -174,6 +173,7 @@
:minCollapsedNum="minCollapsedNum"
:disabledInput="true"
:size="size"
:class="{'layui-unselect': true}"
@clear="handleClear"
>
<template #suffix>
@ -189,6 +189,7 @@
:placeholder="placeholder"
:allow-clear="allowClear"
:readonly="!showSearch"
:class="{'layui-unselect': !showSearch}"
:size="size"
@Input="handleSearch"
@clear="handleClear"
@ -228,4 +229,3 @@
</lay-dropdown>
</div>
</template>

View File

@ -13,7 +13,7 @@
::: demo 使用 `lay-select` 标签, 创建下拉选择框
<template>
<lay-select v-model="value">
<lay-select v-model="value" placeholder="请选择">
<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>

View File

@ -14,17 +14,19 @@
<ul>
<a name="1-5-1"></a>
<li>
<h3>1.5.1 <span class="layui-badge-rim">2022-10-01</span></h3>
<h3>1.5.1 <span class="layui-badge-rim">2022-09-30</span></h3>
<ul>
<li>[新增] avatar 组件 default 查询, 用于显示文本头像</li>
<li>[新增] avatar 组件 default 插槽, 支持文本头像, 用于复杂场景</li>
<li>[新增] avatar 组件 icon 属性, 用于展示 iconfont 头像, 默认值为 `layui-icon-username`</li>
<li>[修复] select 组件 multiple 为 true 且 showSearch 为 true 时光标为输入, 否则为小手指。</li>
<li>[修复] select 组件 slots 延时渲染, 选中项 label 不更新的问题。</li>
</ul>
</li>
</ul>
<ul>
<a name="1-5-0"></a>
<li>
<h3>1.5.0 <span class="layui-badge-rim">2022-10-01</span></h3>
<h3>1.5.0 <span class="layui-badge-rim">2022-09-29</span></h3>
<ul>
<li>[新增] tag-input 标签输入框组件, 用于录入事物的属性与纬度。</li>
<li>[新增] table 组件 header 插槽, 用于在工具栏与表格之间插入元素。</li>