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, - } - ] -}) + }, + ]; +});