Explorar el Código

fix type warnings

Michael Wang hace 3 años
padre
commit
9798eba3ed
Se han modificado 3 ficheros con 136 adiciones y 133 borrados
  1. 1 1
      package.json
  2. 5 2
      src/components/QmButton.vue
  3. 130 130
      yarn.lock

+ 1 - 1
package.json

@@ -11,7 +11,7 @@
     "serve": "vite preview"
   },
   "dependencies": {
-    "ant-design-vue": "^2.2.6",
+    "ant-design-vue": "2.2.6",
     "axios": "^0.21.4",
     "axios-progress-bar": "^1.2.0",
     "axios-retry": "^3.1.9",

+ 5 - 2
src/components/QmButton.vue

@@ -2,7 +2,7 @@
   <!-- FIXED: 从 vue 3.1.5 升级到 3.2.1 时这里出错了,slot也要有key -->
   <a-button v-bind="newAttrs" :loading="inInterval" @click="insideClick">
     <template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
-      <slot :name="slot" v-bind="scope" :key="slot" />
+      <slot :name="slot" v-bind="asAny(scope)" :key="slot" />
     </template>
     <!-- <slot name="default" /> -->
   </a-button>
@@ -34,7 +34,10 @@ export default {
     };
     // newAttrs.onClick = insideClick;
 
-    return { newAttrs, inInterval, insideClick };
+    function asAny(input: any): any {
+      return input as any;
+    }
+    return { newAttrs, inInterval, insideClick, asAny };
   },
 };
 </script>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 130 - 130
yarn.lock


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio