From ffb9e0743b476097bf33980ecff55b0efc30e1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Wed, 22 Jun 2022 19:10:19 +0800 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0types=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E6=94=AF=E6=8C=81=EF=BC=88=E4=BB=A5#?= =?UTF-8?q?=E5=8F=B7=E5=81=9A=E4=B8=BA=E8=B7=AF=E5=BE=84=E7=AE=80=E5=86=99?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/prepare-commit-msg | 2 +- tsconfig.json | 5 +++-- vite.config.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 71fe5b3..6ad929f 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -exec < /dev/tty && npx git-cz --hook || true \ No newline at end of file +#exec < /dev/tty && npx git-cz --hook || true diff --git a/tsconfig.json b/tsconfig.json index d28d948..f859044 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,9 +11,10 @@ "noEmit": true, "baseUrl": "./", "paths": { - "@/*": ["src/*"] + "@/*": ["src/*"], + "#/*": ["types/*"] } }, - "include": ["**/*.ts", "src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "include": ["**/*.ts", "src/**/*.d.ts","types/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], "compileOnSave": false } diff --git a/vite.config.ts b/vite.config.ts index ae36152..3ed901f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,6 +16,7 @@ export default ({ mode }: ConfigEnv): UserConfig => { resolve: { alias: { '@': path.resolve(__dirname, './src'), + '#': path.resolve(__dirname, './types'), }, }, From 8eed2601dbd2420c347d475b8ecec02314299f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Wed, 22 Jun 2022 19:14:28 +0800 Subject: [PATCH 2/7] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0TS=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E6=8E=A8=E8=8D=90ESLint=E8=A7=84=E5=88=99/=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc | 45 ++++++++++++++++++++++++++++++++++++++++++++- src/shims-vue.d.ts | 6 ------ 2 files changed, 44 insertions(+), 7 deletions(-) delete mode 100644 src/shims-vue.d.ts diff --git a/.eslintrc b/.eslintrc index 06bdc19..a9c312d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -44,7 +44,24 @@ "import/first": "off", // https://github.com/vuejs/vue-eslint-parser/issues/58 "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/explicit-module-boundary-types": "off", - "vue/first-attribute-linebreak": 0 + "vue/first-attribute-linebreak": 0, + + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-types": "off" }, "overrides": [ { @@ -57,6 +74,32 @@ "vue/no-v-html": 0, "vue-scoped-css/enforce-style-type": ["error", { "allows": ["scoped"] }] } + }, + { + "files": ["*.ts", "*.tsx"], // https://github.com/typescript-eslint eslint-recommended + "rules": { + "constructor-super": "off", // ts(2335) & ts(2377) + "getter-return": "off", // ts(2378) + "no-const-assign": "off", // ts(2588) + "no-dupe-args": "off", // ts(2300) + "no-dupe-class-members": "off", // ts(2393) & ts(2300) + "no-dupe-keys": "off", // ts(1117) + "no-func-assign": "off", // ts(2539) + "no-import-assign": "off", // ts(2539) & ts(2540) + "no-new-symbol": "off", // ts(2588) + "no-obj-calls": "off", // ts(2349) + "no-redeclare": "off", // ts(2451) + "no-setter-return": "off", // ts(2408) + "no-this-before-super": "off", // ts(2376) + "no-undef": "off", // ts(2304) + "no-unreachable": "off", // ts(7027) + "no-unsafe-negation": "off", // ts(2365) & ts(2360) & ts(2358) + "no-var": "error", // ts transpiles let/const to var, so no need for vars any more + "prefer-const": "error", // ts provides better types with const + "prefer-rest-params": "error", // ts provides better types with rest args over arguments + "prefer-spread": "error", // ts transpiles spread to apply, so no need for manual apply + "valid-typeof": "off" // ts(2367) + } } ] } diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts deleted file mode 100644 index fe7917e..0000000 --- a/src/shims-vue.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.vue' { - import { DefineComponent } from 'vue'; - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types - const component: DefineComponent<{}, {}, any>; - export default component; -} From b95de96257d2779e65c0523aac33c2b82e57ae4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Wed, 22 Jun 2022 19:29:19 +0800 Subject: [PATCH 3/7] =?UTF-8?q?chore:=20=E8=BF=81=E7=A7=BB=E5=8E=9F?= =?UTF-8?q?=E6=9C=89=E6=96=87=E4=BB=B6=E5=B9=B6=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=8C=87=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Header.vue | 2 +- src/layouts/components/MenuContent.tsx | 2 +- src/layouts/components/Notice.vue | 2 +- src/layouts/index.tsx | 2 +- src/pages/detail/advanced/index.vue | 2 +- src/pages/detail/deploy/index.vue | 2 +- src/pages/detail/secondary/index.vue | 2 +- src/pages/list/base/index.vue | 2 +- src/pages/list/card/index.vue | 2 +- src/pages/list/components/CommonTable.vue | 2 +- src/store/modules/notification.ts | 2 +- src/store/modules/tabs-router.ts | 2 +- src/utils/charts.ts | 2 +- src/utils/color.ts | 6 +++--- globals.d.ts => types/globals.d.ts | 10 +++++++++- src/interface.ts => types/interface.d.ts | 0 16 files changed, 25 insertions(+), 17 deletions(-) rename globals.d.ts => types/globals.d.ts (66%) rename src/interface.ts => types/interface.d.ts (100%) diff --git a/src/layouts/components/Header.vue b/src/layouts/components/Header.vue index 2fcd338..274ff6b 100644 --- a/src/layouts/components/Header.vue +++ b/src/layouts/components/Header.vue @@ -70,7 +70,7 @@ import { useSettingStore } from '@/store'; import { getActive } from '@/router'; import { prefix } from '@/config/global'; import LogoFull from '@/assets/assets-logo-full.svg?component'; -import { MenuRoute } from '@/interface'; +import { MenuRoute } from '#/interface'; import Notice from './Notice.vue'; import Search from './Search.vue'; diff --git a/src/layouts/components/MenuContent.tsx b/src/layouts/components/MenuContent.tsx index f2eeb76..f721182 100755 --- a/src/layouts/components/MenuContent.tsx +++ b/src/layouts/components/MenuContent.tsx @@ -1,6 +1,6 @@ import { defineComponent, PropType, computed, h } from 'vue'; import { prefix } from '@/config/global'; -import { MenuRoute } from '@/interface'; +import { MenuRoute } from '#/interface'; import { getActive } from '@/router'; const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => { diff --git a/src/layouts/components/Notice.vue b/src/layouts/components/Notice.vue index 4007a0a..51376c6 100644 --- a/src/layouts/components/Notice.vue +++ b/src/layouts/components/Notice.vue @@ -49,7 +49,7 @@ import { useRouter } from 'vue-router'; import { storeToRefs } from 'pinia'; import { useNotificationStore } from '@/store'; -import { NotificationItem } from '@/interface'; +import { NotificationItem } from '#/interface'; const router = useRouter(); const store = useNotificationStore(); diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 74a798e..019f663 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -11,7 +11,7 @@ import LayoutContent from './components/Content.vue'; import Setting from './setting.vue'; import { prefix } from '@/config/global'; -import { TRouterInfo } from '@/interface'; +import { TRouterInfo } from '#/interface'; import '@/style/layout.less'; diff --git a/src/pages/detail/advanced/index.vue b/src/pages/detail/advanced/index.vue index 6b41596..bb73989 100644 --- a/src/pages/detail/advanced/index.vue +++ b/src/pages/detail/advanced/index.vue @@ -121,7 +121,7 @@ import { ref, onMounted } from 'vue'; import { prefix } from '@/config/global'; import { BASE_INFO_DATA, TABLE_COLUMNS_DATA as columns, PRODUCT_LIST } from './constants'; import request from '@/utils/request'; -import { ResDataType } from '@/interface'; +import { ResDataType } from '#/interface'; import Product from './components/Product.vue'; diff --git a/src/pages/detail/deploy/index.vue b/src/pages/detail/deploy/index.vue index db98147..510a848 100644 --- a/src/pages/detail/deploy/index.vue +++ b/src/pages/detail/deploy/index.vue @@ -89,7 +89,7 @@ import { BASE_INFO_DATA, TABLE_COLUMNS as columns } from './constants'; import { changeChartsTheme } from '@/utils/color'; import { prefix } from '@/config/global'; -import { ResDataType } from '@/interface'; +import { ResDataType } from '#/interface'; import request from '@/utils/request'; echarts.use([ diff --git a/src/pages/detail/secondary/index.vue b/src/pages/detail/secondary/index.vue index 517eb2e..e5bc9dc 100644 --- a/src/pages/detail/secondary/index.vue +++ b/src/pages/detail/secondary/index.vue @@ -60,7 +60,7 @@ export default { import { ref, computed } from 'vue'; import { storeToRefs } from 'pinia'; import { NOTIFICATION_TYPES } from '@/constants'; -import { NotificationItem } from '@/interface'; +import { NotificationItem } from '#/interface'; import EmptyIcon from '@/assets/assets-empty.svg?component'; import { useNotificationStore } from '@/store'; diff --git a/src/pages/list/base/index.vue b/src/pages/list/base/index.vue index 07fd182..8da8cb0 100644 --- a/src/pages/list/base/index.vue +++ b/src/pages/list/base/index.vue @@ -82,7 +82,7 @@ import { MessagePlugin } from 'tdesign-vue-next'; import { CONTRACT_STATUS, CONTRACT_TYPES, CONTRACT_PAYMENT_TYPES } from '@/constants'; import Trend from '@/components/trend/index.vue'; -import { ResDataType } from '@/interface'; +import { ResDataType } from '#/interface'; import request from '@/utils/request'; import { useSettingStore } from '@/store'; diff --git a/src/pages/list/card/index.vue b/src/pages/list/card/index.vue index a748a90..63255eb 100644 --- a/src/pages/list/card/index.vue +++ b/src/pages/list/card/index.vue @@ -74,7 +74,7 @@ import { MessagePlugin } from 'tdesign-vue-next'; import ProductCard from '@/components/product-card/index.vue'; import DialogForm from './components/DialogForm.vue'; import request from '@/utils/request'; -import { ResDataType } from '@/interface'; +import { ResDataType } from '#/interface'; const INITIAL_DATA = { name: '', diff --git a/src/pages/list/components/CommonTable.vue b/src/pages/list/components/CommonTable.vue index 7bd93ca..3bc1825 100644 --- a/src/pages/list/components/CommonTable.vue +++ b/src/pages/list/components/CommonTable.vue @@ -118,7 +118,7 @@ import { ref, computed, onMounted } from 'vue'; import { MessagePlugin } from 'tdesign-vue-next'; import Trend from '@/components/trend/index.vue'; import request from '@/utils/request'; -import { ResDataType } from '@/interface'; +import { ResDataType } from '#/interface'; import { useSettingStore } from '@/store'; import { diff --git a/src/store/modules/notification.ts b/src/store/modules/notification.ts index 7574d34..c7c530c 100644 --- a/src/store/modules/notification.ts +++ b/src/store/modules/notification.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { NotificationItem } from '@/interface'; +import { NotificationItem } from '#/interface'; const msgData = [ { diff --git a/src/store/modules/tabs-router.ts b/src/store/modules/tabs-router.ts index 5e8a393..f237654 100644 --- a/src/store/modules/tabs-router.ts +++ b/src/store/modules/tabs-router.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { TRouterInfo, TTabRouterType } from '@/interface'; +import { TRouterInfo, TTabRouterType } from '#/interface'; import { store } from '@/store'; const homeRoute: Array = [ diff --git a/src/utils/charts.ts b/src/utils/charts.ts index b28162d..93afaa8 100644 --- a/src/utils/charts.ts +++ b/src/utils/charts.ts @@ -29,7 +29,7 @@ export function getDateArray(dateTime: string[] = [], divideNum = 10): string[] * * @memberOf DashboardBase */ -export function getRandomArray(num = 100) { +export function getRandomArray(num = 100): number { let resultNum = Number((Math.random() * num).toFixed(0)); if (resultNum <= 1) { diff --git a/src/utils/color.ts b/src/utils/color.ts index f5c7632..602b37e 100644 --- a/src/utils/color.ts +++ b/src/utils/color.ts @@ -10,11 +10,11 @@ import { getSettingStore } from '@/store'; * @param {string} theme * @returns {} */ -export function getColorFromTheme(theme: string) { +export function getColorFromTheme(theme: string): Array { const settingStore = getSettingStore(); const { colorList, mode } = settingStore; const isDarkMode = mode === 'dark'; - let themeColorList = []; + let themeColorList; const themeColor = getBrandColor(theme, colorList); if (!/^#[A-F\d]{6}$/i.test(theme)) { @@ -52,7 +52,7 @@ export function getChartListColor(): Array { * @param {Array} chartsList * @param {string} theme */ -export function changeChartsTheme(chartsList: echarts.EChartsType[]) { +export function changeChartsTheme(chartsList: echarts.EChartsType[]): void { if (chartsList && chartsList.length) { const chartChangeColor = getChartListColor(); diff --git a/globals.d.ts b/types/globals.d.ts similarity index 66% rename from globals.d.ts rename to types/globals.d.ts index 743a703..048a228 100644 --- a/globals.d.ts +++ b/types/globals.d.ts @@ -1,11 +1,19 @@ // 通用声明 + +// Vue +declare module '*.vue' { + import { DefineComponent } from 'vue'; + + const component: DefineComponent<{}, {}, any>; + export default component; +} + declare type ClassName = { [className: string]: any } | ClassName[] | string; declare interface ImportMeta { env: { MODE: 'mock' | 'development' | 'test' | 'release'; }; - // eslint-disable-next-line no-unused-vars glob: (url: string) => { url }; } diff --git a/src/interface.ts b/types/interface.d.ts similarity index 100% rename from src/interface.ts rename to types/interface.d.ts From 5edf21b1edd467314083c8f394673160fa7a1ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Wed, 22 Jun 2022 20:18:07 +0800 Subject: [PATCH 4/7] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=8C=87=E5=AE=9A=E5=B9=B6=E5=88=A0=E9=99=A4=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 7e527de..a2a664b 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,4 +1,4 @@ -import axios from 'axios'; +import axios, { AxiosInstance } from 'axios'; import proxy from '../config/proxy'; const env = import.meta.env.MODE || 'development'; @@ -8,19 +8,15 @@ const host = env === 'mock' ? '/' : proxy[env].host; // 如果是mock模式 就 const CODE = { LOGIN_TIMEOUT: 1000, REQUEST_SUCCESS: 0, - REQUEST_FOBID: 1001, + REQUEST_FAILED: 1001, }; -const instance = axios.create({ +const instance: AxiosInstance = axios.create({ baseURL: host, - timeout: 1000, + timeout: 5000, withCredentials: true, }); -instance.interceptors.request.use((config) => config); - -instance.defaults.timeout = 5000; - instance.interceptors.response.use( (response) => { if (response.status === 200) { From 9c15ec8ae09e8b279ef686cdab496c27174797c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Thu, 23 Jun 2022 14:07:35 +0800 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20=E8=BF=81=E7=A7=BBtypes=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {types => src/types}/globals.d.ts | 0 {types => src/types}/interface.d.ts | 0 tsconfig.json | 6 +++--- vite.config.ts | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) rename {types => src/types}/globals.d.ts (100%) rename {types => src/types}/interface.d.ts (100%) diff --git a/types/globals.d.ts b/src/types/globals.d.ts similarity index 100% rename from types/globals.d.ts rename to src/types/globals.d.ts diff --git a/types/interface.d.ts b/src/types/interface.d.ts similarity index 100% rename from types/interface.d.ts rename to src/types/interface.d.ts diff --git a/tsconfig.json b/tsconfig.json index f859044..110f73c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,10 +11,10 @@ "noEmit": true, "baseUrl": "./", "paths": { - "@/*": ["src/*"], - "#/*": ["types/*"] + "@/*": ["src/*"] } }, - "include": ["**/*.ts", "src/**/*.d.ts","types/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "include": ["**/*.ts", "src/**/*.d.ts", + "src/types/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], "compileOnSave": false } diff --git a/vite.config.ts b/vite.config.ts index 3ed901f..ae36152 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,7 +16,6 @@ export default ({ mode }: ConfigEnv): UserConfig => { resolve: { alias: { '@': path.resolve(__dirname, './src'), - '#': path.resolve(__dirname, './types'), }, }, From fb978b3668aaed68677c9858a9c0cd2e7d15d5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Thu, 23 Jun 2022 14:16:36 +0800 Subject: [PATCH 6/7] =?UTF-8?q?chore:=20=E5=88=AB=E5=90=8D=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Header.vue | 2 +- src/layouts/components/MenuContent.tsx | 2 +- src/layouts/components/Notice.vue | 2 +- src/layouts/index.tsx | 2 +- src/pages/detail/advanced/index.vue | 2 +- src/pages/detail/deploy/index.vue | 2 +- src/pages/detail/secondary/index.vue | 2 +- src/pages/list/base/index.vue | 2 +- src/pages/list/card/index.vue | 2 +- src/pages/list/components/CommonTable.vue | 2 +- src/store/modules/notification.ts | 2 +- src/store/modules/tabs-router.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/layouts/components/Header.vue b/src/layouts/components/Header.vue index 274ff6b..d6a29b1 100644 --- a/src/layouts/components/Header.vue +++ b/src/layouts/components/Header.vue @@ -70,7 +70,7 @@ import { useSettingStore } from '@/store'; import { getActive } from '@/router'; import { prefix } from '@/config/global'; import LogoFull from '@/assets/assets-logo-full.svg?component'; -import { MenuRoute } from '#/interface'; +import { MenuRoute } from '@/types/interface'; import Notice from './Notice.vue'; import Search from './Search.vue'; diff --git a/src/layouts/components/MenuContent.tsx b/src/layouts/components/MenuContent.tsx index f721182..2132661 100755 --- a/src/layouts/components/MenuContent.tsx +++ b/src/layouts/components/MenuContent.tsx @@ -1,6 +1,6 @@ import { defineComponent, PropType, computed, h } from 'vue'; import { prefix } from '@/config/global'; -import { MenuRoute } from '#/interface'; +import { MenuRoute } from '@/types/interface'; import { getActive } from '@/router'; const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => { diff --git a/src/layouts/components/Notice.vue b/src/layouts/components/Notice.vue index 51376c6..ea7f3b6 100644 --- a/src/layouts/components/Notice.vue +++ b/src/layouts/components/Notice.vue @@ -49,7 +49,7 @@ import { useRouter } from 'vue-router'; import { storeToRefs } from 'pinia'; import { useNotificationStore } from '@/store'; -import { NotificationItem } from '#/interface'; +import { NotificationItem } from '@/types/interface'; const router = useRouter(); const store = useNotificationStore(); diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 019f663..3958f47 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -11,7 +11,7 @@ import LayoutContent from './components/Content.vue'; import Setting from './setting.vue'; import { prefix } from '@/config/global'; -import { TRouterInfo } from '#/interface'; +import { TRouterInfo } from '@/types/interface'; import '@/style/layout.less'; diff --git a/src/pages/detail/advanced/index.vue b/src/pages/detail/advanced/index.vue index bb73989..cdfcf93 100644 --- a/src/pages/detail/advanced/index.vue +++ b/src/pages/detail/advanced/index.vue @@ -121,7 +121,7 @@ import { ref, onMounted } from 'vue'; import { prefix } from '@/config/global'; import { BASE_INFO_DATA, TABLE_COLUMNS_DATA as columns, PRODUCT_LIST } from './constants'; import request from '@/utils/request'; -import { ResDataType } from '#/interface'; +import { ResDataType } from '@/types/interface'; import Product from './components/Product.vue'; diff --git a/src/pages/detail/deploy/index.vue b/src/pages/detail/deploy/index.vue index 510a848..4b0ae3b 100644 --- a/src/pages/detail/deploy/index.vue +++ b/src/pages/detail/deploy/index.vue @@ -89,7 +89,7 @@ import { BASE_INFO_DATA, TABLE_COLUMNS as columns } from './constants'; import { changeChartsTheme } from '@/utils/color'; import { prefix } from '@/config/global'; -import { ResDataType } from '#/interface'; +import { ResDataType } from '@/types/interface'; import request from '@/utils/request'; echarts.use([ diff --git a/src/pages/detail/secondary/index.vue b/src/pages/detail/secondary/index.vue index e5bc9dc..5fc3cc7 100644 --- a/src/pages/detail/secondary/index.vue +++ b/src/pages/detail/secondary/index.vue @@ -60,7 +60,7 @@ export default { import { ref, computed } from 'vue'; import { storeToRefs } from 'pinia'; import { NOTIFICATION_TYPES } from '@/constants'; -import { NotificationItem } from '#/interface'; +import { NotificationItem } from '@/types/interface'; import EmptyIcon from '@/assets/assets-empty.svg?component'; import { useNotificationStore } from '@/store'; diff --git a/src/pages/list/base/index.vue b/src/pages/list/base/index.vue index 8da8cb0..1fb4b45 100644 --- a/src/pages/list/base/index.vue +++ b/src/pages/list/base/index.vue @@ -82,7 +82,7 @@ import { MessagePlugin } from 'tdesign-vue-next'; import { CONTRACT_STATUS, CONTRACT_TYPES, CONTRACT_PAYMENT_TYPES } from '@/constants'; import Trend from '@/components/trend/index.vue'; -import { ResDataType } from '#/interface'; +import { ResDataType } from '@/types/interface'; import request from '@/utils/request'; import { useSettingStore } from '@/store'; diff --git a/src/pages/list/card/index.vue b/src/pages/list/card/index.vue index 63255eb..603a9e0 100644 --- a/src/pages/list/card/index.vue +++ b/src/pages/list/card/index.vue @@ -74,7 +74,7 @@ import { MessagePlugin } from 'tdesign-vue-next'; import ProductCard from '@/components/product-card/index.vue'; import DialogForm from './components/DialogForm.vue'; import request from '@/utils/request'; -import { ResDataType } from '#/interface'; +import { ResDataType } from '@/types/interface'; const INITIAL_DATA = { name: '', diff --git a/src/pages/list/components/CommonTable.vue b/src/pages/list/components/CommonTable.vue index 3bc1825..df55f78 100644 --- a/src/pages/list/components/CommonTable.vue +++ b/src/pages/list/components/CommonTable.vue @@ -118,7 +118,7 @@ import { ref, computed, onMounted } from 'vue'; import { MessagePlugin } from 'tdesign-vue-next'; import Trend from '@/components/trend/index.vue'; import request from '@/utils/request'; -import { ResDataType } from '#/interface'; +import { ResDataType } from '@/types/interface'; import { useSettingStore } from '@/store'; import { diff --git a/src/store/modules/notification.ts b/src/store/modules/notification.ts index c7c530c..3e46c7d 100644 --- a/src/store/modules/notification.ts +++ b/src/store/modules/notification.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { NotificationItem } from '#/interface'; +import { NotificationItem } from '@/types/interface'; const msgData = [ { diff --git a/src/store/modules/tabs-router.ts b/src/store/modules/tabs-router.ts index f237654..1cb3586 100644 --- a/src/store/modules/tabs-router.ts +++ b/src/store/modules/tabs-router.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { TRouterInfo, TTabRouterType } from '#/interface'; +import { TRouterInfo, TTabRouterType } from '@/types/interface'; import { store } from '@/store'; const homeRoute: Array = [ From da81c24bbc0ec33a582d57a126969cc2bcdf0b9a Mon Sep 17 00:00:00 2001 From: Uyarn Date: Thu, 23 Jun 2022 14:37:16 +0800 Subject: [PATCH 7/7] chore: prepare-commit-msg bypass windows --- .husky/prepare-commit-msg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 6ad929f..6720567 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,4 +1,6 @@ #!/bin/sh +[[ "$(uname -a)" = *"MINGW64"* ]] && exit 0 +[ -n "$CI" ] && exit 0 . "$(dirname "$0")/_/husky.sh" -#exec < /dev/tty && npx git-cz --hook || true +exec < /dev/tty && npx git-cz --hook || true \ No newline at end of file