From fcce2ac3205f409703fbbad9b47ddaff02c4e969 Mon Sep 17 00:00:00 2001 From: chutingting Date: Fri, 10 Nov 2023 14:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/types/components.d.ts | 24 +++++++++++++++++++----- src/utils/request.ts | 6 +++++- src/views/apiManage/index.vue | 2 +- src/views/apiManage/model.vue | 22 ++++++++-------------- src/views/home/index.vue | 6 +++--- 6 files changed, 36 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index c806e2f..e2465a5 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^32.0.0", "stylelint-config-standard-scss": "^8.0.0", - "typescript": "^4.9.3", "unocss": "^0.50.1", "unplugin-auto-import": "^0.13.0", "unplugin-icons": "^0.15.1", diff --git a/src/types/components.d.ts b/src/types/components.d.ts index efb8d02..869d3c2 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -23,30 +23,40 @@ declare module '@vue/runtime-core' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] - ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] IEpAvatar: typeof import('~icons/ep/avatar')['default'] - IEpClock: typeof import('~icons/ep/clock')['default'] - IEpDocument: typeof import('~icons/ep/document')['default'] + IEpCloseBold: typeof import('~icons/ep/close-bold')['default'] + IEpCollection: typeof import('~icons/ep/collection')['default'] + IEpDelete: typeof import('~icons/ep/delete')['default'] + IEpDownload: typeof import('~icons/ep/download')['default'] IEpEdit: typeof import('~icons/ep/edit')['default'] IEpHouse: typeof import('~icons/ep/house')['default'] - IEpIconMenu: typeof import('~icons/ep/icon-menu')['default'] IEpLink: typeof import('~icons/ep/link')['default'] + IEpLoading: typeof import('~icons/ep/loading')['default'] + IEpLock: typeof import('~icons/ep/lock')['default'] IEpPlus: typeof import('~icons/ep/plus')['default'] IEpPointer: typeof import('~icons/ep/pointer')['default'] + IEpRefresh: typeof import('~icons/ep/refresh')['default'] + IEpSearch: typeof import('~icons/ep/search')['default'] IEpUser: typeof import('~icons/ep/user')['default'] IEpUserFilled: typeof import('~icons/ep/user-filled')['default'] + IEpVideoPlay: typeof import('~icons/ep/video-play')['default'] LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] MyLoading: typeof import('./../components/myLoading.vue')['default'] @@ -60,4 +70,8 @@ declare module '@vue/runtime-core' { TalkUs: typeof import('./../components/talkUs.vue')['default'] WangEditor: typeof import('./../components/WangEditor/index.vue')['default'] } + export interface ComponentCustomProperties { + vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/src/utils/request.ts b/src/utils/request.ts index 8cc6393..c94703b 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -21,7 +21,11 @@ service.interceptors.request.use( return Promise.reject(error); } ); - +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} // 响应拦截器 service.interceptors.response.use( (response: AxiosResponse) => { diff --git a/src/views/apiManage/index.vue b/src/views/apiManage/index.vue index 0842e55..65514f4 100644 --- a/src/views/apiManage/index.vue +++ b/src/views/apiManage/index.vue @@ -249,7 +249,7 @@ const handleCurrentChange = (val) => { const getListData = async (PageNum, PageSize) => { try { - const res = await businessListApi(PageNum, PageSize, 1, route.query.id); + const res = await businessListApi(PageNum, PageSize, 1, route.query.id || ''); console.log(res, "res"); tableData.value = res.data.list; total.value = res.data.total * 1; diff --git a/src/views/apiManage/model.vue b/src/views/apiManage/model.vue index 59caef7..b67f3fc 100644 --- a/src/views/apiManage/model.vue +++ b/src/views/apiManage/model.vue @@ -45,7 +45,7 @@ -