Skip to content

Commit f2d9af6

Browse files
committed
style: 调整代码结构
1 parent 95cce98 commit f2d9af6

File tree

8 files changed

+6
-5
lines changed

8 files changed

+6
-5
lines changed

config/constant/proxy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ProxyOptions } from 'vite';
2-
import { API_BASE_URL, API_TARGET_URL } from '../../config/constant';
2+
import { API_BASE_URL, API_TARGET_URL } from './settings';
33

44
type ProxyTargetList = Record<string, ProxyOptions>;
55

File renamed without changes.

config/plugins/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function createVitePlugins(isBuild: boolean) {
1515
vueJsx(),
1616
];
1717
// 可自定义进行扩展vite插件 vitePlugins.push(...)
18-
vitePlugins.push(ConfigProgressPlugin);
18+
vitePlugins.push(ConfigProgressPlugin());
1919

2020
return vitePlugins;
2121
}

config/plugins/progress.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import progress from 'vite-plugin-progress';
22

33
/**
44
* @name ConfigProgressPlugin
5-
* @description 构建显示进度条
5+
* @description 构建时显示进度条
66
*/
77
export const ConfigProgressPlugin = () => {
88
return progress();

src/utils/auth.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TokenKey, TokenPrefix } from '../../config/constant/index';
1+
import { TokenKey, TokenPrefix } from '@config/constant/settings';
22

33
// 用于判断是否登录
44
const isLogin = () => {

src/utils/axios/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
22
import { showMessage } from './status';
33
import { IResponse } from '../result';
44
import { getToken } from '../auth';
5-
import { TokenPrefix, API_TARGET_URL } from '../../../config/constant/index';
5+
import { TokenPrefix, API_TARGET_URL } from '@config/constant/settings';
66

77
// 如果请求时间了超过 `timeout` 的时间,请求将被中断
88
axios.defaults.timeout = 5000;

src/utils/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
// 工具函数自行扩展
2+
export { }
File renamed without changes.

0 commit comments

Comments
 (0)