const template=`
布局切换
全局主题
暗黑模式
主题颜色
语言文字
{{lan}}
界面设置
折叠菜单
面包屑
标签栏
页脚
`;
export default {
name: "ThemeSetting",
data: function () {
return {
elementUi:'',
drawerVisible:false,
primary:'',
colorList:[]
}
},
created:function (){
this.elementUi=Yunqi.getElementUi();
this.colorList=[
this.elementUi.theme_color,
"#daa96e",
"#0c819f",
"#409eff",
"#27ae60",
"#ff5c93",
"#e74c3c",
"#fd726d",
"#f39c12",
"#9b59b6"
]
},
template:template,
methods:{
changeLayout:function (value){
this.postData('layout',value,function(){
location.reload();
});
},
changeElementUi:function (key){
let value=this.elementUi[key];
let callback=false;
if(key=='language'){
callback=function (){
location.reload();
};
}
if(key=='dark'){
let win=this.getAppsWindow();
callback=function (){
Yunqi.app.changeLogo();
if(value){
document.documentElement.classList.add('dark');
for(let i=0;i{
if(callback){
callback();
}
});
}
}
};