(component):

This commit is contained in:
就眠儀式 2022-09-28 22:55:53 +08:00
parent 62397afdd7
commit 46953e9a30
5 changed files with 13 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layui-vue",
"version": "1.4.14",
"version": "1.5.0-alpha.2",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",

View File

@ -44,6 +44,7 @@ const matchModule: string[] = [
"dropdownMenuItem",
"tag",
"tagInput",
"footer"
];
export default (): UserConfigExport => {

View File

@ -44,6 +44,7 @@ export interface LaySelectProps {
export interface SelectEmits {
(e: "update:modelValue", value: string): void;
(e: "change", value: string): void;
(e: "search", value: string): void;
}
const props = withDefaults(defineProps<LaySelectProps>(), {
@ -115,9 +116,9 @@ const selectedValue = computed({
get() {
return props.modelValue;
},
set(val) {
emits("update:modelValue", val);
emits("change", val);
set(value) {
emits("update:modelValue", value);
emits("change", value);
},
});
@ -126,6 +127,7 @@ const multiple = computed(() => {
});
const handleSearch = (value: string) => {
emits("search", value);
searchValue.value = value;
};

View File

@ -253,9 +253,10 @@ export default {
| disabled | 是否禁用 | `boolean` | `true` `false` | `false` |
| showEmpty | 是否增加空提示选项 | `boolean` | `true` `false` | `true` |
| multiple | 是否为多选 | `boolean` | `true` `false` | `false` |
| create | 是否允许创建 | `boolean` | `true` `false` | `false` |
| size | 尺寸 | `string` | `lg` `md` `sm` `xs`| `md` |
| searchPlaceholder | 搜索提示 | `string` | -- | -- |
| minCollapsedNum | 多选模式最小折叠数量 | `number` | -- | -- |
| collapseTagsTooltip | 多选折叠后时候悬浮展示 | `boolean` | -- | -- |
:::
@ -268,7 +269,6 @@ export default {
| ------ | ---------- | --------------- |
| change | 切换事件 | value |
| search | 关键词变化事件 | 用户输入的关键词 string |
| create | 允许创建情况下的创建回调事件 | 用户输入的关键词 string |
:::

View File

@ -38,7 +38,7 @@
<li>[优化] tag 组件 border background height 等, 使其更贴合 layui 的设计规范。</li>
<li>[优化] input 组件 suffix prefix password clear 左右布局, 由 15px 调整至 10px。</li>
<li>[优化] input 组件 prefix 与 prefix-icon 存在时, 取消左侧边距缩进。</li>
<li>[删除] select 组件 create 属性。</li>
<li>[删除] select 组件 create 属性 与 create 事件</li>
</ul>
</li>
</ul>