提交 ce7934bc 编写于 作者: KK's avatar KK

增加应用级config

上级 77992ff9
export const appConfig = {
//默认主题
defaultTheme: "app-dark-blue-theme",
//主题集合
themes: [
{
value: "app-blue-theme",
text: "魅力紫",
background: "#705697",
color: "#fff",
},
{
value: "app-dark-blue-theme",
text: "经典蓝",
background: "#5475ab",
color: "#fff",
},
{
value: "app-class-black-theme",
text: "极致黑",
background: "#282829",
color: "#FFF",
},
{
value: "app-light-green-theme",
text: "浅葱绿",
background: "#05D2C2",
color: "#FFF",
},
{
value: "app-peach-pink-theme",
text: "桃桃粉",
background: "#FD84A3",
color: "#FFF",
},
{
value: "app-star-purple-theme",
text: "星辰紫",
background: "#6937D9",
color: "#FFF",
},
{
value: "app-summer-yellow-theme",
text: "盛夏黄",
background: "#FEE45A",
color: "#000",
},
{
value: "app-vital-red-theme",
text: "元气红",
background: "#FE657A",
color: "#FFF",
},
],
};
......@@ -11,7 +11,7 @@
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch, } from "vue-property-decorator";
import { themeGroup } from './config'
import { appConfig } from '@/config/appConfig'
@Component({
i18n: {
messages: {
......@@ -52,7 +52,7 @@ export default class AppSelectTheme extends Vue {
} else if (localStorage.getItem('theme-class')) {
return localStorage.getItem('theme-class');
} else {
return 'app-dark-blue-theme';
return appConfig.defaultTheme;
}
}
......@@ -62,7 +62,7 @@ export default class AppSelectTheme extends Vue {
* @type {any[]}
* @memberof AppSelectTheme
*/
public options: any[] = themeGroup;
public options: any[] = appConfig.themes;
/**
* 激活主题
......
export const themeGroup = [
{ value: "app-blue-theme", text: "魅力紫", background: "#705697", color: "#fff" },
{ value: "app-dark-blue-theme", text: "经典蓝", background: "#5475ab", color: "#fff" },
{ value: "app-class-black-theme", text: "极致黑", background: "#282829", color: "#FFF" },
{ value: "app-light-green-theme", text: "浅葱绿", background: "#05D2C2", color: "#FFF" },
{ value: "app-peach-pink-theme", text: "桃桃粉", background: "#FD84A3", color: "#FFF" },
{ value: "app-star-purple-theme", text: "星辰紫", background: "#6937D9", color: "#FFF" },
{ value: "app-summer-yellow-theme", text: "盛夏黄", background: "#FEE45A", color: "#000" },
{ value: "app-vital-red-theme", text: "元气红", background: "#FE657A", color: "#FFF" },
]
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册