迁移UI框架至naive-ui,重构组件和样式,添加Gallery和Mask组件
This commit is contained in:
+8
-9
@@ -1,4 +1,3 @@
|
||||
import router from "@/router";
|
||||
import type { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from "axios";
|
||||
import axios from "axios";
|
||||
import { useCookies } from "vue3-cookies";
|
||||
@@ -45,16 +44,16 @@ request.interceptors.response.use(
|
||||
console.log("Response error", error);
|
||||
|
||||
if (error.response?.status === 401) {
|
||||
// window.$msg.warning("无效的token");
|
||||
window.$msg.warning("无效的token");
|
||||
cookies.remove("token");
|
||||
cookies.remove("userinfo");
|
||||
window.$modal({
|
||||
title: "无效的token",
|
||||
content: "token已失效,需要登录,请登录 =>",
|
||||
handdleSubmit: () => {
|
||||
router.replace("/login");
|
||||
},
|
||||
});
|
||||
// window.$modal({
|
||||
// title: "无效的token",
|
||||
// content: "token已失效,需要登录,请登录 =>",
|
||||
// handdleSubmit: () => {
|
||||
// router.replace("/login");
|
||||
// },
|
||||
// });
|
||||
|
||||
// router.replace("/login");
|
||||
return "Unauthorized";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* js 文件下使用这个做类型提示
|
||||
* @type import('naive-ui').GlobalThemeOverrides
|
||||
*/
|
||||
const themeOverrides = {
|
||||
common: {
|
||||
primaryColor: '#ec66ab',
|
||||
primaryColorHover: '#ec66ab',
|
||||
primaryColorPressed: '#ec66ab',
|
||||
primaryColorSuppl: '#ec66ab',
|
||||
},
|
||||
// ...
|
||||
}
|
||||
|
||||
export default themeOverrides;
|
||||
Reference in New Issue
Block a user