fix style
This commit is contained in:
@ -5,6 +5,7 @@ import { environment } from '@env/environment';
|
||||
import { NzIconService } from 'ng-zorro-antd/icon';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { VERSION as VERSION_ZORRO } from 'ng-zorro-antd/version';
|
||||
import { ThemeService } from './theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@ -17,7 +18,8 @@ export class AppComponent implements OnInit {
|
||||
private router: Router,
|
||||
private titleSrv: TitleService,
|
||||
private modalSrv: NzModalService,
|
||||
private iconService: NzIconService
|
||||
private iconService: NzIconService,
|
||||
private themeService: ThemeService
|
||||
) {
|
||||
renderer.setAttribute(el.nativeElement, 'ng-alain-version', VERSION_ALAIN.full);
|
||||
renderer.setAttribute(el.nativeElement, 'ng-zorro-version', VERSION_ZORRO.full);
|
||||
@ -47,5 +49,14 @@ export class AppComponent implements OnInit {
|
||||
this.modalSrv.closeAll();
|
||||
}
|
||||
});
|
||||
const screen: any = window.screen
|
||||
var zoom = window.devicePixelRatio || screen.deviceXDPI / screen?.logicalXDPI;
|
||||
console.log(zoom)
|
||||
if (document.body.clientWidth >= 1280) {
|
||||
if (zoom != 1 && zoom != 2 && zoom != 3) {
|
||||
this.themeService.toggleTheme().then();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user