刘嘉威
2023-05-08 581c1fc130d5a76b3450fce6df4aeb30a4bffeac
perf: 升级依赖后一些文件修改
5个文件已修改
60 ■■■■ 已修改文件
package.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/setting.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tsconfig.config.json 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tsconfig.json 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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"
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 {
    // 在发送请求之前做些什么 传token
    let token: any = getLocalStorage(StorageEnum.GB_TOKEN_STORE);
    if (token) {
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>
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",
  ]
}
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"
    }
  ]
}
}