34 lines
674 B
34 lines
674 B
5 years ago
|
import { Component, OnInit } from '@angular/core';
|
||
|
|
||
|
import {CacheTokenService} from '../http-interceptors/cache-token.service'//引入服务
|
||
|
@Component({
|
||
|
selector: 'app-navigation',
|
||
|
templateUrl: './navigation.component.html',
|
||
|
styleUrls: ['./navigation.component.scss']
|
||
|
})
|
||
|
export class NavigationComponent implements OnInit {
|
||
|
|
||
|
constructor(public navmenus:CacheTokenService) { }
|
||
|
|
||
|
ngOnInit() {
|
||
|
|
||
|
}
|
||
|
ngOnDestroy(){
|
||
|
}
|
||
|
|
||
|
|
||
|
darktheme = false;
|
||
|
switchTheme(dark) {
|
||
|
this.darktheme = dark;
|
||
|
// alert(this.darkTheme);
|
||
|
}
|
||
|
defaulttheme(){
|
||
|
console.log(111)
|
||
|
this.darktheme = false
|
||
|
}
|
||
|
redtheme(){
|
||
|
console.log(222)
|
||
|
this.darktheme = true
|
||
|
}
|
||
|
}
|