瀏覽代碼

fix: axios `post` and `get` type

xiaoxian521 3 年之前
父節點
當前提交
d2ddb49314
共有 5 個文件被更改,包括 9 次插入13 次删除
  1. 1 1
      package.json
  2. 1 1
      pnpm-lock.yaml
  3. 0 4
      src/components/ReMap/src/Amap.vue
  4. 1 1
      src/style/element-plus.scss
  5. 6 6
      src/utils/http/index.ts

+ 1 - 1
package.json

@@ -60,7 +60,7 @@
     "vue-router": "^4.0.12",
     "vue-types": "^4.1.1",
     "vuedraggable": "4.1.0",
-    "vxe-table": "^4.1.18",
+    "vxe-table": "^4.1.21",
     "wangeditor": "^4.7.9",
     "xe-utils": "^3.5.2",
     "xgplayer": "2.28.0"

+ 1 - 1
pnpm-lock.yaml

@@ -90,7 +90,7 @@ specifiers:
   vue-router: ^4.0.12
   vue-types: ^4.1.1
   vuedraggable: 4.1.0
-  vxe-table: ^4.1.18
+  vxe-table: ^4.1.21
   wangeditor: ^4.7.9
   windicss: ^3.4.3
   xe-utils: ^3.5.2

+ 0 - 4
src/components/ReMap/src/Amap.vue

@@ -19,10 +19,6 @@ type resultType = {
   info: Array<undefined>;
 };
 
-export interface mapInter {
-  loading: boolean;
-}
-
 let MarkerCluster;
 let map: MapConfigureInter;
 

+ 1 - 1
src/style/element-plus.scss

@@ -46,7 +46,7 @@
   --el-button-active-border-color: var(--el-color-primary-active) !important;
 }
 
-// button--primary plain
+/* button--primary plain */
 .el-button--primary.is-plain {
   --el-button-bg-color: var(--el-color-primary-light-9) !important;
   --el-button-border-color: var(--el-color-primary-light-6) !important;

+ 6 - 6
src/utils/http/index.ts

@@ -145,21 +145,21 @@ class PureHttp {
   }
 
   // 单独抽离的post工具函数
-  public post<T>(
+  public post<T, P>(
     url: string,
     params?: T,
     config?: PureHttpRequestConfig
-  ): Promise<T> {
-    return this.request<T>("post", url, params, config);
+  ): Promise<P> {
+    return this.request<P>("post", url, params, config);
   }
 
   // 单独抽离的get工具函数
-  public get<T>(
+  public get<T, P>(
     url: string,
     params?: T,
     config?: PureHttpRequestConfig
-  ): Promise<T> {
-    return this.request<T>("get", url, params, config);
+  ): Promise<P> {
+    return this.request<P>("get", url, params, config);
   }
 }