(component): 发布 1.7.7 版本

This commit is contained in:
就眠儀式 2022-11-11 13:38:38 +08:00
parent 6f95ba2fae
commit 4abe693301
3 changed files with 19 additions and 19 deletions

View File

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

View File

@ -12,7 +12,7 @@ import {
inject,
WritableComputedRef,
Ref,
ref
ref,
} from "vue";
export interface SelectOptionProps {
@ -30,18 +30,20 @@ const props = withDefaults(defineProps<SelectOptionProps>(), {
const searchValue: Ref<string> = inject("searchValue") as Ref<string>;
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 checkboxRef = ref<HTMLElement>();
const handleSelect = () => {
if(multiple.value) {
if(!props.disabled) {
if (multiple.value) {
if (!props.disabled) {
// @ts-ignore
checkboxRef.value?.toggle();
}
} else {
if(!props.disabled) {
if (!props.disabled) {
// @ts-ignore
selectRef.value.hide();
selectedValue.value = props.value;
@ -66,21 +68,17 @@ const display = computed(() => {
const classes = computed(() => {
return [
'layui-select-option',
"layui-select-option",
{
"layui-this": selected.value,
"layui-disabled": props.disabled,
}
]
})
},
];
});
</script>
<template>
<dd
v-show="display"
:class="classes"
@click="handleSelect"
>
<dd v-show="display" :class="classes" @click="handleSelect">
<template v-if="multiple">
<lay-checkbox
skin="primary"

View File

@ -14,21 +14,23 @@
<ul>
<a name="1-7-7"></a>
<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>
<li>[新增] upload 组件 text 属性, 设置上传描述。</li>
<li>[新增] upload 组件 dragText 属性, 设置拖拽面板提示信息。</li>
<li>[修复] select-option 组件 default 插槽内容为多层元素时, 使用 label 属性值作为回显。</li>
<li>[修复] input-number 组件 step 设置为小数时精度丢失的问题。</li>
<li>[修复] tooltip 组件临近屏幕边界, 三角位置显示错误。</li>
<li>
<li>[优化] select-option 组件 多选 模式只能点击复选框的问题。</li>
<li>[优化] select 组件 search 事件在拼字时触发的问题。</li>
<li>[优化] select 组件 change 事件触发时机不恰当的问题。</li>
</ul>
</li>
</ul>
<ul>
<a name="1-7-6"></a>
<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>
<li>[新增] page-header 组件 back-icon 插槽, 自定义返回图标。</li>
<li>[新增] page-header 组件 back-icon 属性, 自定义返回图标。</li>