style(projects): 格式化代码

This commit is contained in:
Soybean
2021-07-20 10:07:35 +08:00
parent 1e393eb9d4
commit d680e7d931
7 changed files with 54 additions and 7 deletions

View File

@@ -181,7 +181,7 @@ const plugins = [
];
/** 引入element-plus UI组件 */
export default function setupElementPlus(app: App<Element>) {
export default function setupElementPlus(app: App<Element>): void {
/** 国际化 */
locale.use(lang);
components.forEach(component => {

View File

@@ -1,6 +1,6 @@
import smoothscroll from 'smoothscroll-polyfill';
/** 平滑滚动插件(兼容主流浏览器) */
export default function setupSmoothScroll() {
export default function setupSmoothScroll(): void {
smoothscroll.polyfill();
}

View File

@@ -23,7 +23,7 @@ export const errorDuration = 3000 / 1000;
* 网络请求错误状态处理
* @param error - 错误
*/
export function errorHandler(error: any) {
export function errorHandler(error: any): void {
if (error.response) {
const status = error.response.status as ErrorStatus;
ElMessage.error(ERROR_STATUS[status]);

View File

@@ -35,7 +35,7 @@ export default class CustomAxiosInstance {
}
/** 设置请求拦截器 */
setInterceptor(statusConfig: StatusConfig) {
setInterceptor(statusConfig: StatusConfig): void {
this.instance.interceptors.request.use(
config => {
const handleConfig = { ...config };