From 436b52186129e60ba72c20e43d2845bc3f899901 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 22 八月 2024 11:16:56 +0800 Subject: [PATCH] 取消暂停svg更新 --- 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