Commit dfdcfa70 authored by wangqinghua's avatar wangqinghua

初始化调整

parent 35fdc714
...@@ -13,6 +13,6 @@ export const color = { ...@@ -13,6 +13,6 @@ export const color = {
}; };
export const ThemeList = [ export const ThemeList = [
{ value:'white',label:'白色' }, { value:'white',label:'白色主题' },
{ value:'dark',label:'深色' }, { value:'dark',label:'深色主题' },
] ]
...@@ -60,9 +60,7 @@ export class JhiMainComponent implements OnInit { ...@@ -60,9 +60,7 @@ export class JhiMainComponent implements OnInit {
} }
}); });
// const sub = this.appSer.theme.subscribe(value=>{
this.sub = this.appSer.theme.subscribe(value=>{
console.log(value)
this.theme = value; this.theme = value;
}) })
} }
......
...@@ -57,12 +57,14 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -57,12 +57,14 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
) { ) {
this.version = VERSION ? 'v' + VERSION : ''; this.version = VERSION ? 'v' + VERSION : '';
this.isNavbarCollapsed = true; this.isNavbarCollapsed = true;
this.theme = appSer.theme +'';
} }
ngOnInit() { ngOnInit() {
this.user = this.$localStorage.retrieve("userInfo"); this.user = this.$localStorage.retrieve("userInfo");
this.getCurrentRole(); this.getCurrentRole();
const sub = this.appSer.theme.subscribe(value=>{
this.theme = value;
})
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment