Skip to content

Commit

Permalink
build: v15.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EnochGao committed Jun 7, 2023
1 parent 33ea768 commit dcdd7c8
Show file tree
Hide file tree
Showing 27 changed files with 114 additions and 108 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,19 @@ ng add ng-zorro-antd-extension
npm install [email protected] --save
```

v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本

| 依赖环境 | 版本 |
| ------------------------- | ------- |
| angular | ^13.0.0 |
| ng-zorro-antd | ^13.0.0 |
| @ant-design/icons-angular | ^13.0.0 |

| angular | ng-zorro-antd | ng-zorro-antd-extension |
| ------- | ------------- | ----------------------- |
| ^14.0.0 | ^14.0.0 | ^14.0.0 |

| angular | ng-zorro-antd | ng-zorro-antd-extension |
| ------- | ------------- | ----------------------- |
| ^15.0.0 | ^15.0.0 | ^15.0.0 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 |
| angular | ng-zorro-antd | ng-zorro-antd-extension | LTS ENDS |
| ------- | ------------- | ----------------------- | ---------- |
| ^13.0.0 | ^13.0.0 | ^13.0.0 | end |
| ^14.0.0 | ^14.0.0 | ^14.0.0 | end |
| ^15.0.0 | ^15.0.0 | ^15.0.0 | 2024-05-18 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 | 2024-11-08 |

如需指定版本

```bash
npm install [email protected] --save
```

注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本

欢迎 star fork pr
24 changes: 8 additions & 16 deletions components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,19 @@ npm install ng-zorro-antd-extension --save
ng add ng-zorro-antd-extension
```

| angular | ng-zorro-antd | ng-zorro-antd-extension | LTS ENDS |
| ------- | ------------- | ----------------------- | ---------- |
| ^13.0.0 | ^13.0.0 | ^13.0.0 | end |
| ^14.0.0 | ^14.0.0 | ^14.0.0 | end |
| ^15.0.0 | ^15.0.0 | ^15.0.0 | 2024-05-18 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 | 2024-11-08 |

如需指定版本

```bash
npm install [email protected] --save
```

v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本

| 依赖环境 | 版本 |
| ------------------------- | ------- |
| angular | ^13.0.0 |
| ng-zorro-antd | ^13.0.0 |
| @ant-design/icons-angular | ^13.0.0 |

| angular | ng-zorro-antd | ng-zorro-antd-extension |
| ------- | ------------- | ----------------------- |
| ^14.0.0 | ^14.0.0 | ^14.0.0 |

| angular | ng-zorro-antd | ng-zorro-antd-extension |
| ------- | ------------- | ----------------------- |
| ^15.0.0 | ^15.0.0 | ^15.0.0 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 |
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本

欢迎在 [github](https://github.com/EnochGao/ng-zorro-antd-extension) star fork pr
25 changes: 16 additions & 9 deletions components/configurable-query/configurable-query.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export class NzxConfigurableQueryComponent
/** 缺省 固定参数 */
@Input() fixedParams = {};

/** 重置时会触发抛出查询参数 */
@Output() queryChange = new EventEmitter<NzxQueryParams>();
/** 查询时会触发抛出查询参数 */
@Output() queryChange = new EventEmitter<NzxQueryParams>();
/** 重置时会触发抛出查询参数 */
@Output() resetChange = new EventEmitter<NzxQueryParams>();

/** form 表单*/
Expand All @@ -64,8 +64,15 @@ export class NzxConfigurableQueryComponent
isCollapse = true;

/** 查询组件出参*/
queryParams: NzxQueryParams = {};
get queryParams() {
return this._queryParams;
}

set queryParams(value: any) {
this._queryParams = value;
}

private _queryParams: NzxQueryParams = {};
private defaultValue: NzxQueryParams = {};
private params: NzxQueryParams = {};
private destroy$ = new Subject<void>();
Expand All @@ -83,12 +90,12 @@ export class NzxConfigurableQueryComponent
.pipe(takeUntil(this.destroy$))
.subscribe((val) => {
if (val) {
this.queryParams = {
this._queryParams = {
...val,
...this.fixedParams,
};
} else {
this.queryParams = this.fixedParams;
this._queryParams = this.fixedParams;
}
});

Expand All @@ -111,12 +118,12 @@ export class NzxConfigurableQueryComponent
);
}

this.queryParams = {
this._queryParams = {
...this.queryForm.value,
...this.fixedParams,
};

this.defaultValue = Object.assign({}, this.queryParams);
this.defaultValue = Object.assign({}, this._queryParams);

if (this.params) {
// 缓存回显查询条件
Expand Down Expand Up @@ -180,14 +187,14 @@ export class NzxConfigurableQueryComponent
}
});
} else {
this.queryChange.emit(this.queryParams);
this.queryChange.emit(this._queryParams);
}
}

/** 重置 */
reset() {
this.queryForm.reset(this.defaultValue);
this.resetChange.emit(this.queryParams);
this.resetChange.emit(this._queryParams);
}

toggleCollapse() {
Expand Down
2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-zorro-antd-extension",
"version": "15.8.0",
"version": "15.8.1",
"license": "MIT",
"description": "An extension based on ng-zorro-antd",
"keywords": [
Expand Down
56 changes: 32 additions & 24 deletions components/table-adaptor/table-adaptor.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,26 @@ const CACHE_KEY = 'NZX_TABLE_ADAPTOR';
export class NzxTableAdaptor implements OnInit, OnDestroy {
readonly _nzModuleName: NzxConfigKey = NZ_CONFIG_MODULE_NAME;

@Input() queryParams: Partial<NzxTableQueryParams> = {};
@Input() set queryParams(value: any) {
this._queryParams = value;
}
get queryParams() {
return this._queryParams;
}

@ExtensionWithConfig() @Input() enableCache = false;
@ExtensionWithConfig() @Input() dateFormat = 'yyyy-MM-dd';

@ExtensionWithConfig() @Input() customFormateOutFn: (
queryParams: any
) => any = (queryParams: any) => {
for (const key in queryParams) {
if (Object.prototype.hasOwnProperty.call(queryParams, key)) {
if (isDate(queryParams[key])) {
queryParams[key] = format(queryParams[key], this.dateFormat);
@ExtensionWithConfig() @Input() customFormateOutFn: (params: any) => any = (
params: any
) => {
for (const key in params) {
if (Object.prototype.hasOwnProperty.call(params, key)) {
if (isDate(params[key])) {
params[key] = format(params[key], this.dateFormat);
}
if (Array.isArray(queryParams[key])) {
queryParams[key] = queryParams[key].map((el: any) => {
if (Array.isArray(params[key])) {
params[key] = params[key].map((el: any) => {
if (isDate(el)) {
return format(el, this.dateFormat);
}
Expand All @@ -63,17 +69,19 @@ export class NzxTableAdaptor implements OnInit, OnDestroy {
}
}

return trimObject(queryParams);
return trimObject(params);
};

@Output() nzxQueryParams: EventEmitter<NzxTableQueryParams> =
new EventEmitter();
@Output() nzxQueryCacheQueryParams: EventEmitter<NzxTableQueryParams> =
new EventEmitter();

private _queryParams: Partial<NzxTableQueryParams> = {};

private nzTableQueryParams!: NzTableQueryParams;
private destroy$ = new Subject();
private nzxConfigService!: NzxConfigService;
private nzxConfigService: NzxConfigService = inject(NzxConfigService);

private nzTable: NzTableComponent<any> = inject(NzTableComponent);

Expand All @@ -91,8 +99,8 @@ export class NzxTableAdaptor implements OnInit, OnDestroy {
// 用来解决nzTable分页不能及时更新界面问题
this.nzTable.nzQueryParams
.pipe(takeUntil(this.destroy$))
.subscribe((queryParams: NzTableQueryParams) => {
this.nzTableQueryParams = queryParams;
.subscribe((params: NzTableQueryParams) => {
this.nzTableQueryParams = params;
this.emit();
});

Expand Down Expand Up @@ -149,13 +157,13 @@ export class NzxTableAdaptor implements OnInit, OnDestroy {
/**
* 重置查询条件并查询
*/
reset(queryParams?: any) {
if (queryParams) {
this.queryParams = queryParams;
reset(params?: any) {
if (params) {
this._queryParams = params;
} else {
for (const key in this.queryParams) {
if (Object.prototype.hasOwnProperty.call(this.queryParams, key)) {
this.queryParams[key] = '';
for (const key in this._queryParams) {
if (Object.prototype.hasOwnProperty.call(this._queryParams, key)) {
this._queryParams[key] = '';
}
}
}
Expand All @@ -168,18 +176,18 @@ export class NzxTableAdaptor implements OnInit, OnDestroy {
}

private emit() {
const queryParams: NzxTableQueryParams = {
...this.queryParams,
const params: NzxTableQueryParams = {
...this._queryParams,
...this.nzTableQueryParams,
};

if (this.enableCache) {
sessionStorage.setItem(
CACHE_KEY + this.router.url,
JSON.stringify(queryParams)
JSON.stringify(params)
);
}

this.nzxQueryParams.emit(this.customFormateOutFn(queryParams));
this.nzxQueryParams.emit(this.customFormateOutFn(params));
}
}
6 changes: 3 additions & 3 deletions components/timer-button/doc/zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
category: component
category: directive
title: 倒计时button
subtitle: nzxTimerButton
order: 7
subtitle: nzx-timer-button
order: 4
label: new
---

Expand Down
1 change: 0 additions & 1 deletion components/timer-button/timer-button.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class NzxTimerButtonDirective implements OnInit, OnDestroy {
takeUntil(this.destroy$)
)
.subscribe((i) => {
console.log(i);
this.remainingTime.emit(i);
if (i === 0) {
this.disabled = false;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/changelog/v15.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
category: component
title: v15.8.1
order: 8
---

### BUG 修复

`nzx-timer-button`

- 修复配置报错
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/en-us/changelog/v15.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
category: component
title: v15.8.1
order: 8
---

### BUG Fix

`nzx-timer-button`

- fix config error
24 changes: 7 additions & 17 deletions docs/en-us/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ or
ng add ng-zorro-antd-extension
```

| angular | ng-zorro-antd | ng-zorro-antd-extension | LTS ENDS |
| ------- | ------------- | ----------------------- | ---------- |
| ^13.0.0 | ^13.0.0 | ^13.0.0 | end |
| ^14.0.0 | ^14.0.0 | ^14.0.0 | end |
| ^15.0.0 | ^15.0.0 | ^15.0.0 | 2024-05-18 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 | 2024-11-08 |

Install the specified version if required using:

```bash
Expand All @@ -47,21 +54,4 @@ npm install [email protected] --save

v13.0.0(contains only multi-select, simple table, mapping pipeline), v14.0.0+ is recommended

| dependencies | version |
| ------------------------- | ------- |
| angular | ^13.0.0 |
| ng-zorro-antd | ^13.0.0 |
| @ant-design/icons-angular | ^13.0.0 |

| dependencies | version |
| ------------------------- | ------- |
| angular | ^14.0.0 |
| ng-zorro-antd | ^14.0.0 |
| @ant-design/icons-angular | ^14.0.0 |

| dependencies | version |
| ------------- | ------- |
| angular | ^15.0.0 |
| ng-zorro-antd | ^15.0.0 |

Welcome to [github](https://github.com/EnochGao/ng-zorro-antd-extension) star fork pr
26 changes: 8 additions & 18 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,19 @@ npm install ng-zorro-antd-extension --save
ng add ng-zorro-antd-extension
```

| angular | ng-zorro-antd | ng-zorro-antd-extension | LTS ENDS |
| ------- | ------------- | ----------------------- | ---------- |
| ^13.0.0 | ^13.0.0 | ^13.0.0 | end |
| ^14.0.0 | ^14.0.0 | ^14.0.0 | end |
| ^15.0.0 | ^15.0.0 | ^15.0.0 | 2024-05-18 |
| ^16.0.0 | ^16.0.0 | ^15.6.0 ^16.0.0 | 2024-11-08 |

如需指定版本

```bash
npm install [email protected] --save
```

v13.0.0(只包含多选框,简单表格,映射管道),推荐使用 v14.0.0+以上版本,具体 feature 请查看组件文档中基本使用下的版本

| 依赖环境 | 版本 |
| ------------------------- | ------- |
| angular | ^13.0.0 |
| ng-zorro-antd | ^13.0.0 |
| @ant-design/icons-angular | ^13.0.0 |

| 依赖环境 | 版本 |
| ------------------------- | ------- |
| angular | ^14.0.0 |
| ng-zorro-antd | ^14.0.0 |
| @ant-design/icons-angular | ^14.0.0 |

| 依赖环境 | 版本 |
| ------------- | ------- |
| angular | ^15.0.0 |
| ng-zorro-antd | ^15.0.0 |
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本

欢迎在 [github](https://github.com/EnochGao/ng-zorro-antd-extension) star fork pr
Loading

0 comments on commit dcdd7c8

Please sign in to comment.