Преглед на файлове

chore(Loading): 消除loading组件及示例类型问题

invalid w преди 1 година
родител
ревизия
d84f6ef562
променени са 2 файла, в които са добавени 8 реда и са изтрити 2 реда
  1. 1 1
      src/components/Loading/src/Loading.vue
  2. 7 1
      src/views/demo/comp/loading/index.vue

+ 1 - 1
src/components/Loading/src/Loading.vue

@@ -1,7 +1,7 @@
 <template>
   <section
     class="full-loading"
-    :class="{ absolute, [theme]: !!theme }"
+    :class="{ absolute, [`${theme}`]: !!theme }"
     :style="[background ? `background-color: ${background}` : '']"
     v-show="loading"
   >

+ 7 - 1
src/views/demo/comp/loading/index.vue

@@ -40,7 +40,13 @@
       const wrapEl = ref<ElRef>(null);
 
       const loadingRef = ref(false);
-      const compState = reactive({
+      const compState = reactive<{
+        absolute?: boolean;
+        loading?: boolean;
+        theme?: 'dark' | 'light';
+        background?: string;
+        tip?: string;
+      }>({
         absolute: false,
         loading: false,
         theme: 'dark',