From 581c1fc130d5a76b3450fce6df4aeb30a4bffeac Mon Sep 17 00:00:00 2001 From: 刘嘉威 <daidaibg@163.com> Date: 星期一, 08 五月 2023 17:53:19 +0800 Subject: [PATCH] perf: 升级依赖后一些文件修改 --- src/views/setting.vue | 6 +++--- tsconfig.json | 36 ++++++++++++++++++++++++++++++++---- package.json | 3 ++- src/api/api.ts | 4 ++-- tsconfig.config.json | 11 +++++++++-- 5 files changed, 48 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 90c58fb..4205276 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "0.0.0", "scripts": { "dev": "vite", - "build": "run-p type-check build-only", + "build:old": "run-p type-check build-only", + "build": "vite build", "preview": "vite preview --port 4173", "build-only": "vite build", "type-check": "vue-tsc --noEmit" diff --git a/src/api/api.ts b/src/api/api.ts index 9f26064..b8029de 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,7 +1,7 @@ /* * @LastEditors: Please set LastEditors - * @LastEditTime: 2023-02-24 15:04:36 + * @LastEditTime: 2023-05-08 17:44:36 */ import axios from 'axios'; @@ -16,7 +16,7 @@ export { baseUrl }; // axios.defaults.withCredentials = true; // 娣诲姞璇锋眰鎷︽埅鍣� -axios.interceptors.request.use(function (config: AxiosRequestConfig) { +axios.interceptors.request.use(function (config: AxiosRequestConfig):any { // 鍦ㄥ彂閫佽姹備箣鍓嶅仛浜涗粈涔� 浼爐oken let token: any = getLocalStorage(StorageEnum.GB_TOKEN_STORE); if (token) { diff --git a/src/views/setting.vue b/src/views/setting.vue index ca02c87..d637f3b 100644 --- a/src/views/setting.vue +++ b/src/views/setting.vue @@ -53,7 +53,7 @@ >: </span> <div class="setting_content"> - <el-radio-group v-model="isScaleRadio" @change="isScaleChange"> + <el-radio-group v-model="isScaleRadio" @change="(flag)=>isScaleChange(flag as boolean)"> <el-radio :label="true">鏄�</el-radio> <el-radio :label="false">鍚�</el-radio> </el-radio-group> @@ -67,7 +67,7 @@ <div class="setting_content"> <el-radio-group v-model="leftBottomRadio" - @change="indexRadioChange" + @change="(flag)=>indexRadioChange(flag as boolean)" > <el-radio :label="true">鏄�</el-radio> <el-radio :label="false">鍚�</el-radio> @@ -79,7 +79,7 @@ <div class="setting_content"> <el-radio-group v-model="rightBottomRadio" - @change="indexRadioChange" + @change="(flag)=>indexRadioChange(flag as boolean)" > <el-radio :label="true">鏄�</el-radio> <el-radio :label="false">鍚�</el-radio> diff --git a/tsconfig.config.json b/tsconfig.config.json index ab367d6..7a76102 100644 --- a/tsconfig.config.json +++ b/tsconfig.config.json @@ -1,6 +1,13 @@ { - "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], "compilerOptions": { "composite": true, - } + "module": "esnext", + "moduleResolution": "node" + }, + "exclude": ["node_modules","public"], + "include": [ + "vite.config.ts", + "config/**/*.ts", + "config/**/*.d.ts", + ] } diff --git a/tsconfig.json b/tsconfig.json index ce106c4..e554493 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,46 @@ { - "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "types"], "compilerOptions": { + "target": "esnext", + "useDefineForClassFields": true, + "module": "esnext", + "moduleResolution": "node", + "strict": true, + "jsx": "preserve", + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "lib": [ + "esnext", + "dom" + ], "baseUrl": "./", - "types": ["vite/client" ,"element-plus/global"], + "types": [ + "node", + "vite/client", + "element-plus/global" + ], "paths": { - "@/*": ["src/*"], + "@/*": [ + "src/*" + ], "api/*": [ "src/api/*" ], } }, + "include": [ + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.tsx", + "src/**/*.vue", + "types/env.d.ts", + "types/*.d.ts" + ], + "exclude": ["node_modules","public"], "references": [ { "path": "./tsconfig.config.json" } ] -} +} \ No newline at end of file -- Gitblit v1.8.0