From da3404e05f0c67b08b155e84974d4ac73e3677af Mon Sep 17 00:00:00 2001 From: cipchk Date: Mon, 25 Nov 2024 12:30:33 +0800 Subject: [PATCH] refactor(module:*): remove ngClass andngStyle --- .../abc/avatar-list/avatar-list.component.html | 6 +++--- packages/abc/avatar-list/avatar-list.component.ts | 3 +-- packages/abc/ellipsis/ellipsis.component.html | 6 +++--- packages/abc/ellipsis/ellipsis.component.ts | 4 ++-- packages/abc/loading/loading.component.html | 2 +- packages/abc/loading/loading.component.ts | 3 +-- .../abc/notice-icon/notice-icon.component.html | 4 ++-- packages/abc/notice-icon/notice-icon.component.ts | 3 +-- packages/abc/quick-menu/quick-menu.component.html | 2 +- packages/abc/quick-menu/quick-menu.component.ts | 3 +-- packages/abc/se/se.component.html | 6 +----- packages/abc/se/se.component.ts | 3 +-- packages/abc/st/st-td.component.html | 6 +++--- packages/abc/st/st.component.html | 6 +++--- packages/abc/sv/sv-container.component.ts | 5 ++--- .../mini-progress/mini-progress.component.html | 8 ++++---- .../chart/mini-progress/mini-progress.component.ts | 3 +-- packages/chart/pie/pie.component.html | 2 +- packages/chart/pie/pie.component.ts | 3 +-- packages/chart/radar/radar.component.html | 2 +- packages/chart/radar/radar.component.ts | 3 +-- .../chart/water-wave/water-wave.component.html | 4 ++-- packages/chart/water-wave/water-wave.component.ts | 3 +-- packages/form/src/sf.component.html | 2 +- packages/form/src/widgets/array/array.widget.ts | 4 ++-- packages/form/src/widgets/date/date.widget.ts | 10 +++++----- .../form/src/widgets/number/number.widget.html | 2 +- packages/form/src/widgets/number/number.widget.ts | 2 +- .../theme/layout-default/layout-nav.component.html | 2 +- .../setting-drawer/setting-drawer.component.html | 2 +- .../components/code-box/code-box.component.html | 14 ++++++++------ .../components/code-box/code-box.component.ts | 3 +-- .../shared/components/footer/footer.component.ts | 3 +-- 33 files changed, 60 insertions(+), 74 deletions(-) diff --git a/packages/abc/avatar-list/avatar-list.component.html b/packages/abc/avatar-list/avatar-list.component.html index f39eacc01e..f59e202859 100644 --- a/packages/abc/avatar-list/avatar-list.component.html +++ b/packages/abc/avatar-list/avatar-list.component.html @@ -1,6 +1,6 @@ diff --git a/packages/abc/avatar-list/avatar-list.component.ts b/packages/abc/avatar-list/avatar-list.component.ts index 9619074be8..447977daa5 100644 --- a/packages/abc/avatar-list/avatar-list.component.ts +++ b/packages/abc/avatar-list/avatar-list.component.ts @@ -1,5 +1,4 @@ import { Direction, Directionality } from '@angular/cdk/bidi'; -import { NgClass, NgStyle } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, @@ -34,7 +33,7 @@ import { AvatarListItemComponent } from './avatar-list-item.component'; changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [NgStyle, NgClass, NzAvatarComponent, NzTooltipDirective] + imports: [NzAvatarComponent, NzTooltipDirective] }) export class AvatarListComponent implements AfterViewInit, OnChanges { private readonly cdr = inject(ChangeDetectorRef); diff --git a/packages/abc/ellipsis/ellipsis.component.html b/packages/abc/ellipsis/ellipsis.component.html index 90c453c456..f196352f4e 100644 --- a/packages/abc/ellipsis/ellipsis.component.html +++ b/packages/abc/ellipsis/ellipsis.component.html @@ -15,7 +15,7 @@ @switch (type) { @case ('default') { - + } @case ('length') { @@ -24,11 +24,11 @@ @case ('line-clamp') { -
+
} @case ('line') { -
+
{{ linsWord }} diff --git a/packages/abc/ellipsis/ellipsis.component.ts b/packages/abc/ellipsis/ellipsis.component.ts index 48cd254747..9f75d0374e 100644 --- a/packages/abc/ellipsis/ellipsis.component.ts +++ b/packages/abc/ellipsis/ellipsis.component.ts @@ -1,5 +1,5 @@ import { CdkObserveContent } from '@angular/cdk/observers'; -import { DOCUMENT, NgClass, NgStyle, NgTemplateOutlet } from '@angular/common'; +import { DOCUMENT, NgTemplateOutlet } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, @@ -29,7 +29,7 @@ import { NzTooltipDirective } from 'ng-zorro-antd/tooltip'; changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [CdkObserveContent, NzTooltipDirective, NgTemplateOutlet, NgClass, NgStyle] + imports: [CdkObserveContent, NzTooltipDirective, NgTemplateOutlet] }) export class EllipsisComponent implements AfterViewInit, OnChanges { private readonly el: HTMLElement = inject(ElementRef).nativeElement; diff --git a/packages/abc/loading/loading.component.html b/packages/abc/loading/loading.component.html index 2ac6e2a728..d337d25d7f 100644 --- a/packages/abc/loading/loading.component.html +++ b/packages/abc/loading/loading.component.html @@ -8,7 +8,7 @@ } @default { -
+
} }
diff --git a/packages/abc/loading/loading.component.ts b/packages/abc/loading/loading.component.ts index c8f9bc81cb..f2757f9790 100644 --- a/packages/abc/loading/loading.component.ts +++ b/packages/abc/loading/loading.component.ts @@ -1,5 +1,4 @@ import { Direction } from '@angular/cdk/bidi'; -import { NgStyle } from '@angular/common'; import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; import { NzIconDirective } from 'ng-zorro-antd/icon'; @@ -18,7 +17,7 @@ import { LoadingCustom, LoadingIcon, LoadingShowOptions } from './loading.types' changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [NzSpinComponent, NzIconDirective, NgStyle] + imports: [NzSpinComponent, NzIconDirective] }) export class LoadingDefaultComponent { options!: LoadingShowOptions; diff --git a/packages/abc/notice-icon/notice-icon.component.html b/packages/abc/notice-icon/notice-icon.component.html index f3d08c05e5..4618475925 100644 --- a/packages/abc/notice-icon/notice-icon.component.html +++ b/packages/abc/notice-icon/notice-icon.component.html @@ -1,6 +1,6 @@ - - + + @if (data!.length <= 0) { diff --git a/packages/abc/notice-icon/notice-icon.component.ts b/packages/abc/notice-icon/notice-icon.component.ts index ebd438d738..204ac7eb84 100644 --- a/packages/abc/notice-icon/notice-icon.component.ts +++ b/packages/abc/notice-icon/notice-icon.component.ts @@ -1,4 +1,4 @@ -import { NgClass, NgTemplateOutlet } from '@angular/common'; +import { NgTemplateOutlet } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -37,7 +37,6 @@ import { NoticeIconSelect, NoticeItem } from './notice-icon.types'; encapsulation: ViewEncapsulation.None, standalone: true, imports: [ - NgClass, NgTemplateOutlet, NzBadgeComponent, NzIconDirective, diff --git a/packages/abc/quick-menu/quick-menu.component.html b/packages/abc/quick-menu/quick-menu.component.html index e3342dbca6..a161d83a5f 100644 --- a/packages/abc/quick-menu/quick-menu.component.html +++ b/packages/abc/quick-menu/quick-menu.component.html @@ -1,5 +1,5 @@
-
+
diff --git a/packages/abc/quick-menu/quick-menu.component.ts b/packages/abc/quick-menu/quick-menu.component.ts index 5c3770b3f1..514aa2909b 100644 --- a/packages/abc/quick-menu/quick-menu.component.ts +++ b/packages/abc/quick-menu/quick-menu.component.ts @@ -1,4 +1,3 @@ -import { NgStyle } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -32,7 +31,7 @@ import { NzIconDirective } from 'ng-zorro-antd/icon'; changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, - imports: [NgStyle, NzIconDirective, NzStringTemplateOutletDirective] + imports: [NzIconDirective, NzStringTemplateOutletDirective] }) export class QuickMenuComponent implements OnInit, OnChanges { private readonly cdr = inject(ChangeDetectorRef); diff --git a/packages/abc/se/se.component.html b/packages/abc/se/se.component.html index 6b7ad7a950..0cd776f4ab 100644 --- a/packages/abc/se/se.component.html +++ b/packages/abc/se/se.component.html @@ -1,10 +1,6 @@
@if (label) { -