✨(component): 发布 1.7.7 版本
This commit is contained in:
parent
6f95ba2fae
commit
4abe693301
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "1.7.7-alpha.1",
|
"version": "1.7.7",
|
||||||
"author": "就眠儀式",
|
"author": "就眠儀式",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
|
@ -12,7 +12,7 @@ import {
|
|||||||
inject,
|
inject,
|
||||||
WritableComputedRef,
|
WritableComputedRef,
|
||||||
Ref,
|
Ref,
|
||||||
ref
|
ref,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
|
|
||||||
export interface SelectOptionProps {
|
export interface SelectOptionProps {
|
||||||
@ -30,18 +30,20 @@ const props = withDefaults(defineProps<SelectOptionProps>(), {
|
|||||||
|
|
||||||
const searchValue: Ref<string> = inject("searchValue") as Ref<string>;
|
const searchValue: Ref<string> = inject("searchValue") as Ref<string>;
|
||||||
const selectRef: Ref<HTMLElement> = inject("selectRef") as Ref<HTMLElement>;
|
const selectRef: Ref<HTMLElement> = inject("selectRef") as Ref<HTMLElement>;
|
||||||
const selectedValue: WritableComputedRef<any> = inject("selectedValue") as WritableComputedRef<any>;
|
const selectedValue: WritableComputedRef<any> = inject(
|
||||||
|
"selectedValue"
|
||||||
|
) as WritableComputedRef<any>;
|
||||||
const multiple: ComputedRef = inject("multiple") as ComputedRef;
|
const multiple: ComputedRef = inject("multiple") as ComputedRef;
|
||||||
const checkboxRef = ref<HTMLElement>();
|
const checkboxRef = ref<HTMLElement>();
|
||||||
|
|
||||||
const handleSelect = () => {
|
const handleSelect = () => {
|
||||||
if(multiple.value) {
|
if (multiple.value) {
|
||||||
if(!props.disabled) {
|
if (!props.disabled) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
checkboxRef.value?.toggle();
|
checkboxRef.value?.toggle();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!props.disabled) {
|
if (!props.disabled) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
selectRef.value.hide();
|
selectRef.value.hide();
|
||||||
selectedValue.value = props.value;
|
selectedValue.value = props.value;
|
||||||
@ -66,25 +68,21 @@ const display = computed(() => {
|
|||||||
|
|
||||||
const classes = computed(() => {
|
const classes = computed(() => {
|
||||||
return [
|
return [
|
||||||
'layui-select-option',
|
"layui-select-option",
|
||||||
{
|
{
|
||||||
"layui-this": selected.value,
|
"layui-this": selected.value,
|
||||||
"layui-disabled": props.disabled,
|
"layui-disabled": props.disabled,
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<dd
|
<dd v-show="display" :class="classes" @click="handleSelect">
|
||||||
v-show="display"
|
|
||||||
:class="classes"
|
|
||||||
@click="handleSelect"
|
|
||||||
>
|
|
||||||
<template v-if="multiple">
|
<template v-if="multiple">
|
||||||
<lay-checkbox
|
<lay-checkbox
|
||||||
skin="primary"
|
skin="primary"
|
||||||
ref="checkboxRef"
|
ref="checkboxRef"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:value="value"
|
:value="value"
|
||||||
|
@ -14,21 +14,23 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<a name="1-7-7"></a>
|
<a name="1-7-7"></a>
|
||||||
<li>
|
<li>
|
||||||
<h3>1.7.7 <span class="layui-badge-rim">2022-11-10</span></h3>
|
<h3>1.7.7 <span class="layui-badge-rim">2022-11-11</span></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>[新增] upload 组件 text 属性, 设置上传描述。</li>
|
<li>[新增] upload 组件 text 属性, 设置上传描述。</li>
|
||||||
<li>[新增] upload 组件 dragText 属性, 设置拖拽面板提示信息。</li>
|
<li>[新增] upload 组件 dragText 属性, 设置拖拽面板提示信息。</li>
|
||||||
<li>[修复] select-option 组件 default 插槽内容为多层元素时, 使用 label 属性值作为回显。</li>
|
<li>[修复] select-option 组件 default 插槽内容为多层元素时, 使用 label 属性值作为回显。</li>
|
||||||
<li>[修复] input-number 组件 step 设置为小数时精度丢失的问题。</li>
|
<li>[修复] input-number 组件 step 设置为小数时精度丢失的问题。</li>
|
||||||
<li>[修复] tooltip 组件临近屏幕边界, 三角位置显示错误。</li>
|
<li>[修复] tooltip 组件临近屏幕边界, 三角位置显示错误。</li>
|
||||||
<li>
|
<li>[优化] select-option 组件 多选 模式只能点击复选框的问题。</li>
|
||||||
|
<li>[优化] select 组件 search 事件在拼字时触发的问题。</li>
|
||||||
|
<li>[优化] select 组件 change 事件触发时机不恰当的问题。</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<a name="1-7-6"></a>
|
<a name="1-7-6"></a>
|
||||||
<li>
|
<li>
|
||||||
<h3>1.7.6 <span class="layui-badge-rim">2022-11-07</span></h3>
|
<h3>1.7.6 <span class="layui-badge-rim">2022-11-09</span></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>[新增] page-header 组件 back-icon 插槽, 自定义返回图标。</li>
|
<li>[新增] page-header 组件 back-icon 插槽, 自定义返回图标。</li>
|
||||||
<li>[新增] page-header 组件 back-icon 属性, 自定义返回图标。</li>
|
<li>[新增] page-header 组件 back-icon 属性, 自定义返回图标。</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user