mirror of
				https://github.com/ionic-team/ionic-framework.git
				synced 2025-11-04 13:17:56 +08:00 
			
		
		
		
	fix(mode): set mode css class on ion-app
This commit is contained in:
		@ -19,6 +19,7 @@ export class App {
 | 
			
		||||
  @Element() el: HTMLElement;
 | 
			
		||||
 | 
			
		||||
  @Prop({ context: 'config' }) config: Config;
 | 
			
		||||
  mode: string;
 | 
			
		||||
 | 
			
		||||
  componentWillLoad() {
 | 
			
		||||
    this.isDevice = this.config.getBoolean('isDevice', false);
 | 
			
		||||
@ -26,12 +27,11 @@ export class App {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  hostData() {
 | 
			
		||||
    const mode = this.config.get('mode');
 | 
			
		||||
    const hoverCSS = this.config.getBoolean('hoverCSS', false);
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
      class: {
 | 
			
		||||
        [mode]: true,
 | 
			
		||||
        [this.mode]: true,
 | 
			
		||||
        'enable-hover': hoverCSS
 | 
			
		||||
      }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user