How to use the @delon/util.updateHostClass function in @delon/util

To help you get started, we’ve selected a few @delon/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dotnetcore / OSharp / tests / web / ui / ng-alain8 / src / app / layout / default / default.component.ts View on Github external
private setClass() {
    const { el, doc, renderer, settings } = this;
    const layout = settings.layout;
    updateHostClass(el.nativeElement, renderer, {
      ['alain-default']: true,
      [`alain-default__fixed`]: layout.fixed,
      [`alain-default__collapsed`]: layout.collapsed,
    });

    doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
  }
github dotnetcore / OSharp / tests / web / ui / ng-alain7 / src / app / layout / default / default.component.ts View on Github external
private setClass() {
    const { el, doc, renderer, settings } = this;
    const layout = settings.layout;
    updateHostClass(
      el.nativeElement,
      renderer,
      {
        ['alain-default']: true,
        [`alain-default__fixed`]: layout.fixed,
        [`alain-default__collapsed`]: layout.collapsed,
      },
    );

    doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
  }
github dotnetcore / Util / sample / Util.Samples.Angular.AntDesign / Typings / app / home / layout / default / default.component.ts View on Github external
private setClass() {
    const { el, doc, renderer, settings } = this;
    const layout = settings.layout;
    updateHostClass(
      el.nativeElement,
      renderer,
      {
        ['alain-default']: true,
        [`alain-default__fixed`]: layout.fixed,
        [`alain-default__collapsed`]: layout.collapsed,
      },
    );

    doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
  }
github ng-alain / delon / packages / chart / pie / pie.component.ts View on Github external
private setCls() {
    const { el, rend, hasLegend, isPercent } = this;
    const ne = el.nativeElement as HTMLElement;
    updateHostClass(
      ne,
      rend,
      {
        'g2-pie': true,
        'g2-pie__legend-has': hasLegend,
        'g2-pie__legend-block': hasLegend && ne.clientWidth <= 380,
        'g2-pie__mini': isPercent,
      },
      true,
    );
  }
github personball / abplus-zero-template / angular / src / app / layout / default / default.component.ts View on Github external
private setClass() {
    const { el, doc, renderer, settings } = this;
    const layout = settings.layout;
    updateHostClass(
      el.nativeElement,
      renderer,
      {
        ['alain-default']: true,
        [`alain-default__fixed`]: layout.fixed,
        [`alain-default__collapsed`]: layout.collapsed,
      },
    );

    doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
  }
github ng-alain / delon / packages / abc / view / view-container.component.ts View on Github external
private setClass() {
    const { el, ren, size, layout } = this;
    updateHostClass(el, ren, {
      [`${prefixCls}__container`]: true,
      [`${prefixCls}__${size}`]: true,
      [`${prefixCls}__${layout}`]: true,
      [`clearfix`]: true,
    });
  }
github ng-alain / delon / packages / abc / standard-form-row / standard-form-row.component.ts View on Github external
setClass() {
    const classMap = {
      ['ad-standard-form-row']: true,
      ['block']: this.block,
      ['grid']: this.grid,
      ['last']: this.last,
    };
    updateHostClass(this.el.nativeElement, this.renderer, classMap);
  }