瀏覽代碼

fixTS类型报错

lisy 1 月之前
父節點
當前提交
36c1f50e23
共有 3 個文件被更改,包括 19 次插入1 次删除
  1. 6 1
      src/pages/plant/index.vue
  2. 13 0
      src/types/global.d.ts
  3. 0 0
      stats.html

+ 6 - 1
src/pages/plant/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <z-paging ref="paging" v-model="list" @query="queryList" @onRefresh="onRefresh">
+    <z-paging ref="paging" v-model="list" @onRefresh="onRefresh">
         <template #top>
             <up-navbar title="种植端首页" @leftClick="navigateBackOrHome()" :fixed="false"></up-navbar>
         </template>
@@ -8,6 +8,11 @@
 </template>
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
+const list = ref([]);
+const paging = ref();
+const onRefresh = () => {
+    paging.value.reload();
+};
 setTimeout(() => {
     useClientRequest.get('/time');
 }, 2000);

+ 13 - 0
src/types/global.d.ts

@@ -89,4 +89,17 @@ declare global {
         pageSize: number;
     }
 }
+
+import '@vue/runtime-core';
+
+declare module '@vue/runtime-core' {
+  export interface ComponentCustomProperties {
+    navigateBackOrHome: () => void;
+    showToast: (title: string) => void;
+    selectDictLabel: (datas: any, value: number | string) => string;
+    selectDictLabels: (datas: any, value: any, separator?: any) => string;
+    useDict: (...args: string[]) => { [key: string]: DictDataOption[] };
+    $u: any;
+  }
+}
 export {};

File diff suppressed because it is too large
+ 0 - 0
stats.html


Some files were not shown because too many files changed in this diff