Skip to content

Commit

Permalink
fix: css-unit pipe update
Browse files Browse the repository at this point in the history
  • Loading branch information
chensimeng committed Sep 17, 2020
1 parent 0c4b4d1 commit c8c62cc
Show file tree
Hide file tree
Showing 53 changed files with 155 additions and 170 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ components/form/** @danranVm
components/page-header/** @CK110
components/transfer/** @Ricbet
components/i18n/** @wenqi73
components/pipes/** @chensimeng

# The `components/core/*` owners
components/core/config/** @wendellhu95
Expand Down
1 change: 1 addition & 0 deletions .github/nz-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,4 @@ issue:
Form: danranVm
PageHeader: CK110
Transfer: Ricbet
Pipes: chensimeng
28 changes: 0 additions & 28 deletions components/core/public-api.ts

This file was deleted.

5 changes: 3 additions & 2 deletions components/modal/modal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { NgModule } from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { NzPipesModule } from 'ng-zorro-antd/core/pipe';
import { NzI18nModule } from 'ng-zorro-antd/i18n';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzPipesModule } from 'ng-zorro-antd/pipes';

import { NzModalCloseComponent } from './modal-close.component';
import { NzModalConfirmContainerComponent } from './modal-confirm-container.component';
Expand All @@ -34,7 +34,8 @@ import { NzModalService } from './modal.service';
NzButtonModule,
NzIconModule,
NzPipesModule,
NzNoAnimationModule
NzNoAnimationModule,
NzPipesModule
],
exports: [NzModalComponent, NzModalFooterDirective],
providers: [NzModalService],
Expand Down
14 changes: 0 additions & 14 deletions components/pipe/demo/bytes.md

This file was deleted.

11 changes: 0 additions & 11 deletions components/pipe/demo/css-unit.ts

This file was deleted.

12 changes: 0 additions & 12 deletions components/pipe/demo/math.ts

This file was deleted.

15 changes: 0 additions & 15 deletions components/pipe/demo/sanitizer.md

This file was deleted.

16 changes: 0 additions & 16 deletions components/pipe/nz-css-unit.pipe.ts

This file was deleted.

14 changes: 14 additions & 0 deletions components/pipes/demo/bytes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
order: 1
title:
zh-CN: nzBytes
en-US: nzBytes
---

## zh-CN

存储单位的换算,增加可读性

## en-US

Conversion of storage units to increase readability
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ title:

## zh-CN

Css 单位补全
Css 单位

## en-US

Css unit completion
Css unit
13 changes: 13 additions & 0 deletions components/pipes/demo/css-unit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';

@Component({
selector: 'nz-demo-pipe-css-unit',
template: `
<div>
<img [style.height]="100 | nzToCssUnit" src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
</div>
<div [style.height]="50 | nzToCssUnit: 'pt'"></div>
<div [style.height]="'100px' | nzToCssUnit"></div>
`
})
export class NzDemoPipeCssUnitComponent {}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-pipe-ellipsis',
template: `
{{ 'Hello World' | nzEllipsis: 4 }}<br />
{{ 'Hello World' | nzEllipsis: 4:'':true }}<br />
{{ 'Hello World' | nzEllipsis: 4:'...':true }}<br />
{{ 'Hello World' | nzEllipsis: 4 }}
<br />
{{ 'Hello World' | nzEllipsis: 4:'':true }}
<br />
{{ 'Hello World' | nzEllipsis: 4:'...':true }}
<br />
{{ 'Hello World, how is it going?' | nzEllipsis: 14:'...':true }}
`
})
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions components/pipes/demo/math.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component } from '@angular/core';

@Component({
selector: 'nz-demo-pipe-math',
template: `
{{ [7, 8, 2, 3] | nzMath: 'min' }}
<br />
{{ [7, 8, 2, 3] | nzMath: 'max' }}
<br />
{{ [7, 8, 2, 3] | nzMath: 'sum' }}
<br />
{{ [7, 8, 2, 3] | nzMath: 'avg' }}
<br />
`
})
export class NzDemoPipeMathComponent {}
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions components/pipes/demo/sanitizer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
order: 6
title:
zh-CN: nzSanitizer
en-US: nzSanitizer
---

## zh-CN

DomSanitizer 的 Pipe 实现

## en-US

Pipe implementation of DomSanitizer
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-pipe-some',
template: `
{{ [5, 6, 7, 8, 9] | nzSome: method }}<br />
{{ [6, 7, 8, 9, 10] | nzSome: method }}<br />
{{ [5, 6, 7, 8, 9] | nzSome: method }}
<br />
{{ [6, 7, 8, 9, 10] | nzSome: method }}
<br />
`
})
export class NzDemoPipeSomeComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ title:

## zh-CN

返回指定时间格式
按自定义格式返回间隔时间

## en-US

Returns the specified time format
Return interval time in custom format
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-pipe-time-range',
template: `
{{ diff | nzTimeRange: format1 }}<br />
{{ diff | nzTimeRange: format2 }}<br />
{{ diff | nzTimeRange: format3 }}<br />
{{ diff1 | nzTimeRange }}<br />
{{ diff | nzTimeRange: format1 }}
<br />
{{ diff | nzTimeRange: format2 }}
<br />
{{ diff | nzTimeRange: format3 }}
<br />
{{ diff1 | nzTimeRange }}
<br />
`
})
export class NzDemoPipeTimeRangeComponent {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-pipe-trim',
template: `
{{ 'hello' | nzTrim }}<br />
{{ 'hello ' | nzTrim }}<br />
{{ ' hello ' | nzTrim }}<br />
{{ 'hello' | nzTrim }}
<br />
{{ 'hello ' | nzTrim }}
<br />
{{ ' hello ' | nzTrim }}
<br />
`
})
export class NzDemoPipeTrimComponent {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
category: Components
type: General
title: Pipe
type: Data Entry
cols: 1
experimental: true
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
category: Components
type: 数据录入
title: 常用
subtitle: Pipe
type: 通用
title: Pipe
cols: 1
experimental: true
---
Expand Down
File renamed without changes.
Loading

0 comments on commit c8c62cc

Please sign in to comment.