perf: 同步完整版分支代码
This commit is contained in:
@@ -7,7 +7,7 @@ NProgress.configure({
|
||||
// 递增进度条的速度
|
||||
speed: 500,
|
||||
// 是否显示加载ico
|
||||
showSpinner: true,
|
||||
showSpinner: false,
|
||||
// 自动递增间隔
|
||||
trickleSpeed: 200,
|
||||
// 初始化时的最小百分比
|
||||
|
@@ -3,45 +3,53 @@ import { App } from "vue";
|
||||
import Storage from "responsive-storage";
|
||||
|
||||
export const injectResponsiveStorage = (app: App, config: ServerConfigs) => {
|
||||
app.use(Storage, {
|
||||
// 默认显示首页tag
|
||||
routesInStorage: {
|
||||
type: Array,
|
||||
default: Storage.getData(undefined, "routesInStorage") ?? [
|
||||
{
|
||||
path: "/welcome",
|
||||
parentPath: "/",
|
||||
meta: {
|
||||
title: "message.hshome",
|
||||
i18n: true,
|
||||
icon: "HomeFilled",
|
||||
showLink: true
|
||||
const configObj = Object.assign(
|
||||
{
|
||||
// 国际化 默认中文zh
|
||||
locale: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "locale") ?? {
|
||||
locale: config.Locale ?? "zh"
|
||||
}
|
||||
},
|
||||
// layout模式以及主题
|
||||
layout: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "layout") ?? {
|
||||
layout: config.Layout ?? "vertical",
|
||||
theme: config.Theme ?? "default"
|
||||
}
|
||||
},
|
||||
sets: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "sets") ?? {
|
||||
grey: config.Grey ?? false,
|
||||
weak: config.Weak ?? false,
|
||||
hideTabs: config.HideTabs ?? false
|
||||
}
|
||||
}
|
||||
},
|
||||
config.MultiTagsCache
|
||||
? {
|
||||
// 默认显示首页tag
|
||||
tags: {
|
||||
type: Array,
|
||||
default: Storage.getData(undefined, "tags") ?? [
|
||||
{
|
||||
path: "/welcome",
|
||||
parentPath: "/",
|
||||
meta: {
|
||||
title: "message.hshome",
|
||||
i18n: true,
|
||||
icon: "HomeFilled",
|
||||
showLink: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// 国际化 默认中文zh
|
||||
locale: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "locale") ?? {
|
||||
locale: config.Locale ?? "zh"
|
||||
}
|
||||
},
|
||||
// layout模式以及主题
|
||||
layout: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "layout") ?? {
|
||||
layout: config.Layout ?? "vertical",
|
||||
theme: config.Theme ?? "default"
|
||||
}
|
||||
},
|
||||
sets: {
|
||||
type: Object,
|
||||
default: Storage.getData(undefined, "sets") ?? {
|
||||
grey: config.Grey ?? false,
|
||||
weak: config.Weak ?? false,
|
||||
hideTabs: config.HideTabs ?? false
|
||||
}
|
||||
}
|
||||
});
|
||||
: {}
|
||||
);
|
||||
|
||||
app.use(Storage, configObj);
|
||||
};
|
||||
|
Reference in New Issue
Block a user