From 4abe693301619cfe9f82df45920dc8f9d6508b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Fri, 11 Nov 2022 13:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20=E5=8F=91=E5=B8=83=201.?= =?UTF-8?q?7.7=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/package.json | 2 +- .../src/component/selectOption/index.vue | 28 +++++++++---------- .../src/document/zh-CN/guide/changelog.md | 8 ++++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package/component/package.json b/package/component/package.json index fd08e3d1..e3e4ee03 100644 --- a/package/component/package.json +++ b/package/component/package.json @@ -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", diff --git a/package/component/src/component/selectOption/index.vue b/package/component/src/component/selectOption/index.vue index bc751613..235f8ea3 100644 --- a/package/component/src/component/selectOption/index.vue +++ b/package/component/src/component/selectOption/index.vue @@ -12,7 +12,7 @@ import { inject, WritableComputedRef, Ref, - ref + ref, } from "vue"; export interface SelectOptionProps { @@ -30,18 +30,20 @@ const props = withDefaults(defineProps(), { const searchValue: Ref = inject("searchValue") as Ref; const selectRef: Ref = inject("selectRef") as Ref; -const selectedValue: WritableComputedRef = inject("selectedValue") as WritableComputedRef; +const selectedValue: WritableComputedRef = inject( + "selectedValue" +) as WritableComputedRef; const multiple: ComputedRef = inject("multiple") as ComputedRef; const checkboxRef = ref(); 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,25 +68,21 @@ const display = computed(() => { const classes = computed(() => { return [ - 'layui-select-option', + "layui-select-option", { "layui-this": selected.value, "layui-disabled": props.disabled, - } - ] -}) + }, + ]; +});