From ebbd788fbb2c0b45d4473798efc57eec8ba74a25 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 18 六月 2024 14:51:16 +0800 Subject: [PATCH] 版本更新至2.11.5 --- src/components/Loading/src/Loading.vue | 62 +++++++++++++++---------------- 1 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/components/Loading/src/Loading.vue b/src/components/Loading/src/Loading.vue index 3803085..734974e 100644 --- a/src/components/Loading/src/Loading.vue +++ b/src/components/Loading/src/Loading.vue @@ -1,47 +1,45 @@ <template> <section class="full-loading" - :class="{ absolute, [theme]: !!theme }" + :class="{ absolute, [`${theme}`]: !!theme }" :style="[background ? `background-color: ${background}` : '']" v-show="loading" > <Spin v-bind="$attrs" :tip="tip" :size="size" :spinning="loading" /> </section> </template> -<script lang="ts"> - import { PropType, defineComponent } from 'vue'; +<script lang="ts" setup> + import type { PropType } from 'vue'; import { Spin } from 'ant-design-vue'; - import { SizeEnum } from '/@/enums/sizeEnum'; + import { SizeEnum } from '@/enums/sizeEnum'; - export default defineComponent({ - name: 'Loading', - components: { Spin }, - props: { - tip: { - type: String as PropType<string>, - default: '', + defineOptions({ name: 'Loading' }); + + defineProps({ + tip: { + type: String as PropType<string>, + default: '', + }, + size: { + type: String as PropType<SizeEnum>, + default: SizeEnum.LARGE, + validator: (v: SizeEnum): boolean => { + return [SizeEnum.DEFAULT, SizeEnum.SMALL, SizeEnum.LARGE].includes(v); }, - size: { - type: String as PropType<SizeEnum>, - default: SizeEnum.LARGE, - validator: (v: SizeEnum): boolean => { - return [SizeEnum.DEFAULT, SizeEnum.SMALL, SizeEnum.LARGE].includes(v); - }, - }, - absolute: { - type: Boolean as PropType<boolean>, - default: false, - }, - loading: { - type: Boolean as PropType<boolean>, - default: false, - }, - background: { - type: String as PropType<string>, - }, - theme: { - type: String as PropType<'dark' | 'light'>, - }, + }, + absolute: { + type: Boolean as PropType<boolean>, + default: false, + }, + loading: { + type: Boolean as PropType<boolean>, + default: false, + }, + background: { + type: String as PropType<string>, + }, + theme: { + type: String as PropType<'dark' | 'light'>, }, }); </script> -- Gitblit v1.9.3