From 5b757a9f2a813505f611d17aac2b572275837db7 Mon Sep 17 00:00:00 2001 From: cipchk Date: Thu, 11 Jan 2024 17:53:47 +0800 Subject: [PATCH] feat(abc:tag-select): support standalone --- packages/abc/pdf/demo/design.md | 2 +- packages/abc/tag-select/demo/simple.md | 4 ++-- packages/abc/tag-select/index.en-US.md | 2 +- packages/abc/tag-select/index.zh-CN.md | 2 +- packages/abc/tag-select/tag-select.component.ts | 5 ++++- packages/abc/tag-select/tag-select.module.ts | 3 +-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/abc/pdf/demo/design.md b/packages/abc/pdf/demo/design.md index 92b4adbad..c30f0b3da 100644 --- a/packages/abc/pdf/demo/design.md +++ b/packages/abc/pdf/demo/design.md @@ -18,7 +18,7 @@ import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { Subject } from 'rxjs'; -import { PdfChangeEvent, PdfComponent, PdfComponent, PdfZoomScale } from '@delon/abc/pdf'; +import { PdfChangeEvent, PdfComponent, PdfZoomScale } from '@delon/abc/pdf'; import { SEModule } from '@delon/abc/se'; import { NzButtonModule } from 'ng-zorro-antd/button'; import type { NzSafeAny } from 'ng-zorro-antd/core/types'; diff --git a/packages/abc/tag-select/demo/simple.md b/packages/abc/tag-select/demo/simple.md index 4aee3091e..5316c6753 100644 --- a/packages/abc/tag-select/demo/simple.md +++ b/packages/abc/tag-select/demo/simple.md @@ -8,7 +8,7 @@ title: 基础样例 ```ts import { Component } from '@angular/core'; -import { TagSelectModule } from '@delon/abc/tag-select'; +import { TagSelectComponent } from '@delon/abc/tag-select'; import { NzTagModule } from 'ng-zorro-antd/tag'; interface TagSelectDemoItem { @@ -29,7 +29,7 @@ interface TagSelectDemoItem { `, standalone: true, - imports: [TagSelectModule, NzTagModule] + imports: [TagSelectComponent, NzTagModule] }) export class DemoComponent { categories: TagSelectDemoItem[] = [ diff --git a/packages/abc/tag-select/index.en-US.md b/packages/abc/tag-select/index.en-US.md index d77e5cb9e..255d9f7cd 100644 --- a/packages/abc/tag-select/index.en-US.md +++ b/packages/abc/tag-select/index.en-US.md @@ -10,7 +10,7 @@ Increase the label expansion and retraction function. ## API -### tag-select +### tag-select:standalone | Property | Description | Type | Default | |----------|-------------|------|---------| diff --git a/packages/abc/tag-select/index.zh-CN.md b/packages/abc/tag-select/index.zh-CN.md index c55aa5fbb..02ce60c34 100644 --- a/packages/abc/tag-select/index.zh-CN.md +++ b/packages/abc/tag-select/index.zh-CN.md @@ -10,7 +10,7 @@ module: import { TagSelectModule } from '@delon/abc/tag-select'; ## API -### tag-select +### tag-select:standalone | 成员 | 说明 | 类型 | 默认值 | |----|----|----|-----| diff --git a/packages/abc/tag-select/tag-select.component.ts b/packages/abc/tag-select/tag-select.component.ts index c2dc3a06f..cf9a1ea20 100644 --- a/packages/abc/tag-select/tag-select.component.ts +++ b/packages/abc/tag-select/tag-select.component.ts @@ -16,6 +16,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { DelonLocaleService, LocaleData } from '@delon/theme'; import { BooleanInput, InputBoolean } from '@delon/util/decorator'; +import { NzIconDirective } from 'ng-zorro-antd/icon'; @Component({ selector: 'tag-select', @@ -30,7 +31,9 @@ import { BooleanInput, InputBoolean } from '@delon/util/decorator'; }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None + encapsulation: ViewEncapsulation.None, + standalone: true, + imports: [NzIconDirective] }) export class TagSelectComponent implements OnInit { static ngAcceptInputType_expandable: BooleanInput; diff --git a/packages/abc/tag-select/tag-select.module.ts b/packages/abc/tag-select/tag-select.module.ts index 6c9a638ac..52ef6ae5d 100644 --- a/packages/abc/tag-select/tag-select.module.ts +++ b/packages/abc/tag-select/tag-select.module.ts @@ -9,8 +9,7 @@ import { TagSelectComponent } from './tag-select.component'; const COMPONENTS = [TagSelectComponent]; @NgModule({ - imports: [CommonModule, NzIconModule, DelonLocaleModule], - declarations: COMPONENTS, + imports: [CommonModule, NzIconModule, DelonLocaleModule, ...COMPONENTS], exports: COMPONENTS }) export class TagSelectModule {}