(component): 发布 1.6.9 版本

This commit is contained in:
就眠儀式 2022-10-19 00:01:09 +08:00
parent b50aa5f1fe
commit 96a3ef9180
7 changed files with 36 additions and 55 deletions

View File

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

View File

@ -16,17 +16,13 @@ import {
VNode,
Component,
watch,
nextTick,
onUnmounted,
h,
} from "vue";
import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.vue";
import LayTagInput from "../tagInput/index.vue";
import LayDropdown from "../dropdown/index.vue";
import LaySelectOption, {
LaySelectOptionProps,
} from "../selectOption/index.vue";
import LaySelectOption, { SelectOptionProps } from "../selectOption/index.vue";
import { SelectSize } from "./interface";
export interface SelectProps {
@ -38,7 +34,7 @@ export interface SelectProps {
emptyMessage?: string;
modelValue?: any;
multiple?: boolean;
items?: LaySelectOptionProps[];
items?: SelectOptionProps[];
size?: SelectSize;
collapseTagsTooltip?: boolean;
minCollapsedNum?: number;
@ -77,30 +73,34 @@ const openState: Ref<boolean> = ref(false);
const options = ref<any>([]);
var timer: any;
const getOption = (nodes: VNode[]) => {
nodes
?.filter((item: VNode) => {
return item.children != "v-if";
})
?.map((item: VNode) => {
let component = item.type as Component;
if (component.name === LaySelectOption.name) {
if (item.children) {
// @ts-ignore
item.props.label = item.children.default()[0].children;
}
options.value.push(item.props);
} else {
getOption(item.children as VNode[]);
const getOption = (nodes: VNode[], newOptions: any[]) => {
const showNodes = nodes?.filter((item: VNode) => {
return item.children != "v-if";
});
showNodes?.map((item: VNode) => {
let component = item.type as Component;
if (component.name === LaySelectOption.name) {
if (item.children) {
// @ts-ignore
item.props.label = item.children.default()[0].children;
}
});
newOptions.push(item.props);
} else {
getOption(item.children as VNode[], newOptions);
}
});
};
const intOption = () => {
const newOptions: any[] = [];
if (slots.default) {
getOption(slots.default());
getOption(slots.default(), newOptions);
}
Object.assign(newOptions, props.items);
if (JSON.stringify(newOptions) != JSON.stringify(options.value)) {
options.value = newOptions;
}
Object.assign(options.value, props.items);
};
const handleRemove = (value: any) => {
@ -248,4 +248,4 @@ provide("multiple", multiple);
</template>
</lay-dropdown>
</div>
</template>
</template>

View File

@ -61,7 +61,6 @@ import LayDropdownSubMenu from "./component/dropdownSubMenu/index";
import LayTab from "./component/tab/index";
import LayTabItem from "./component/tabItem/index";
import LayTree from "./component/tree/index";
import LayTreeSelect from "./component/treeSelect/index";
import LayTable from "./component/table/index";
import LayPage from "./component/page/index";
import LayTransfer from "./component/transfer/index";
@ -181,7 +180,6 @@ const components: Record<string, Plugin> = {
LaySpace,
LayTag,
LayTagInput,
LayTreeSelect,
};
const install = (app: App, options?: InstallOptions): void => {
@ -278,7 +276,6 @@ export {
LaySpace,
LayTag,
LayTagInput,
LayTreeSelect,
install,
};

View File

@ -214,7 +214,7 @@ export default {
::: demo
<template>
<lay-button @click="mvalue=[1,5,7]">点击切换(当前值:{{mvalue.join()}})</lay-button>
<lay-button @click="mvalue=['1','5','7']">点击切换(当前值:{{mvalue.join()}})</lay-button>
<br/>
<br/>
<lay-select v-model="mvalue" @change="change" multiple>

View File

@ -5,35 +5,25 @@
<lay-timeline-item title="🐛 尾版本号:日常问题更新。" simple></lay-timeline-item>
<lay-timeline-item title="🌟 次版本号:带有新特性的向下兼容的版本。" simple></lay-timeline-item>
<lay-timeline-item title="♻️ 主版本号:含有破坏性更新和新特性,不在发布周期内。" simple></lay-timeline-item>
<lay-timeline-item title="♻️ 其他说明:含有破坏性更新和新特性,不在发布周期内。" simple></lay-timeline-item>
</lay-timeline>
::: demo
<template>
<lay-timeline>
<lay-timeline-item title="1.7.x">
<lay-timeline-item title="1.6.x">
<ul>
<a name="1-7-0"></a>
<a name="1-6-9"></a>
<li>
<h3>1.7.0 <span class="layui-badge-rim">2022-10-15</span></h3>
<h3>1.6.9 <span class="layui-badge-rim">2022-10-18</span></h3>
<ul>
<li>
<li>table 组件</li>
<ul>
<li>[新增] ** 属性。</li>
<li>[新增] ** 方法。</li>
</ul>
</li>
<li>[新增] tree-select 下拉树组件, 提供树结构数据选择能力。</li>
<li>[修复] upload 组件 drag 为 true 时, 获取不到拖拽文件 files 集合, 并直接预览上传资源。</li>
<li>[其他] global 整体组件源码逻辑优化, 更好的兼容 typescript 类型。</li>
<li>[优化] layer 组件 id 属性, 当值相同时仅保留最新的弹层实例。</li>
<li>[修复] select 组件内部维护 options 时导致的内存溢出问题。</li>
<li>[修复] select 组件单选模式 showSearch 属性开启时, 输入框循环重置的问题。</li>
<li>[修复] upload 组件 drag 为 true 时, 获取拖拽文件 files 集合失败, 无法正常上传。</li>
<li>[优化] layer 组件 id 属性, 当值相同时仅保留最新的弹出层实例。</li>
<li>[升级] layer-vue 1.4.6 版本。</li>
</ul>
</li>
</ul>
</lay-timeline-item>
<lay-timeline-item title="1.6.x">
<ul>
<a name="1-6-8"></a>
<li>

View File

@ -35,8 +35,8 @@ layui - vue谐音类 UI) 是 一 套 Vue 3.0 的 桌 面 端 组 件 库 ,
<br>
<lay-timeline>
<lay-timeline-item simple>欢迎在<a href="https://github.com/layui/layui-vue/issues/new">提交问题</a>上向我们反馈。欢迎功能请求。如果您想贡献,请查看<a href="https://gitee.com/layui/layui-vue/blob/next/CONTRIBUTING.md">快速指南</a></lay-timeline-item>
<lay-timeline-item simple>如果您有什么想聊的,请随时加入我们的<a href="https://gitter.im/layui-vue/community">交流群</a></lay-timeline-item>
<lay-timeline-item simple>欢迎在 <a href="https://gitee.com/layui/layui-vue/issues">提交问题</a> 上向我们反馈。欢迎功能请求。如果您想贡献,请查看 <a href="https://gitee.com/layui/layui-vue/blob/next/CONTRIBUTING.md">快速指南</a></lay-timeline-item>
<lay-timeline-item simple>如果您有什么想聊的,请随时加入我们的<a href="https://gitter.im/layui-vue/community"> Gitter</a></lay-timeline-item>
</lay-timeline>
::: title 环境要求

View File

@ -191,12 +191,6 @@ const menus = [
subTitle: "tagInput",
path: "/zh-CN/components/tagInput",
},
{
id: 39,
title: "树选择",
subTitle: "treeSelect",
path: "/zh-CN/components/treeSelect",
},
{
id: 40,
title: "颜色选择器",