mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: 支持易盾RCDN部署
This commit is contained in:
@@ -109,8 +109,8 @@ function createService() {
|
||||
error.message += `: ${error.response?.config?.url}`;
|
||||
errorLog(error, error?.response?.config?.showErrorNotify);
|
||||
if (status === 401) {
|
||||
// const userStore = useUserStore();
|
||||
// userStore.logout();
|
||||
const userStore = useUserStore();
|
||||
userStore.logout();
|
||||
}
|
||||
|
||||
if (error?.config?.onError) {
|
||||
|
||||
@@ -18,7 +18,7 @@ async function bootstrap() {
|
||||
const app = createApp(App);
|
||||
// app.use(Antd);
|
||||
app.use(Antd);
|
||||
await setupVben(app, { loadMessages });
|
||||
await setupVben(app, { loadMessages, router });
|
||||
app.use(router);
|
||||
// app.use(i18n);
|
||||
// app.use(store);
|
||||
|
||||
@@ -8,6 +8,7 @@ import Avatar from "ant-design-vue/es/avatar";
|
||||
import Steps from "ant-design-vue/es/steps";
|
||||
import Select from "ant-design-vue/es/select";
|
||||
import PageHeader from "ant-design-vue/es/page-header";
|
||||
import Card from "ant-design-vue/es/card";
|
||||
|
||||
export default {
|
||||
install(app: any) {
|
||||
@@ -20,14 +21,11 @@ export default {
|
||||
app.use(PageHeader);
|
||||
app.use(Steps);
|
||||
app.use(Select);
|
||||
app.use(Card);
|
||||
|
||||
app.component(
|
||||
"AInputPassword",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/input/Password"))
|
||||
);
|
||||
app.component(
|
||||
"AButtonGroup",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/button/button-group"))
|
||||
"AAutoComplete",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/auto-complete/index"))
|
||||
);
|
||||
app.component(
|
||||
"ARadio",
|
||||
@@ -114,10 +112,7 @@ export default {
|
||||
"AInputAutoComplete",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/auto-complete/index"))
|
||||
);
|
||||
app.component(
|
||||
"ACard",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/card/index"))
|
||||
);
|
||||
|
||||
app.component(
|
||||
"ACascader",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/cascader/index"))
|
||||
|
||||
@@ -11,10 +11,16 @@ import "./styles/antd/index.css";
|
||||
import { useTitle } from "@vueuse/core";
|
||||
import { setupI18n } from "/@/vben/locales";
|
||||
|
||||
export async function setupVben(app: any, { loadMessages }: any) {
|
||||
export async function setupVben(app: any, { loadMessages, router }: any) {
|
||||
await setupI18n(app, { loadMessages });
|
||||
const store = await initStores(app, { namespace: "fs" });
|
||||
|
||||
watchEffect(() => {
|
||||
if (preferences.app.dynamicTitle) {
|
||||
const routeTitle = router.currentRoute.value.title;
|
||||
const pageTitle = routeTitle || "" + preferences.app.name;
|
||||
useTitle(pageTitle);
|
||||
}
|
||||
});
|
||||
return { store };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user