Skip to content

Commit

Permalink
chore: fix some demos
Browse files Browse the repository at this point in the history
  • Loading branch information
simplejason committed Jun 10, 2022
1 parent 32eefd1 commit 018fdeb
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 22 deletions.
4 changes: 2 additions & 2 deletions components/grid/demo/flex.md
Expand Up @@ -9,9 +9,9 @@ title:

布局基础。

子元素根据不同的值 `start`,`center`,`end`,`space-between`,`space-around`,分别定义其在父节点里面的排版方式。
子元素根据不同的值 `start``center``end``space-between``space-around``space-evenly`,分别定义其在父节点里面的排版方式。

## en-US

Child elements depending on the value of the `start`,` center`, `end`,` space-between`, `space-around`, which are defined in its parent node layout mode.
Child elements depending on the value of the `start`,` center`, `end`,` space-between`, `space-around`, `space-evenly`, which are defined in its parent node layout mode.

7 changes: 7 additions & 0 deletions components/grid/demo/flex.ts
Expand Up @@ -39,6 +39,13 @@ import { Component } from '@angular/core';
<div nz-col nzSpan="4">col-4</div>
<div nz-col nzSpan="4">col-4</div>
</div>
<p>sub-element align evenly</p>
<div nz-row nzJustify="space-evenly">
<div nz-col nzSpan="4">col-4</div>
<div nz-col nzSpan="4">col-4</div>
<div nz-col nzSpan="4">col-4</div>
<div nz-col nzSpan="4">col-4</div>
</div>
</div>
`,
styles: [
Expand Down
3 changes: 2 additions & 1 deletion components/grid/row.directive.ts
Expand Up @@ -25,7 +25,7 @@ import { takeUntil } from 'rxjs/operators';
import { gridResponsiveMap, NzBreakpointKey, NzBreakpointService } from 'ng-zorro-antd/core/services';
import { IndexableObject } from 'ng-zorro-antd/core/types';

export type NzJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between';
export type NzJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
export type NzAlign = 'top' | 'middle' | 'bottom';

@Directive({
Expand All @@ -41,6 +41,7 @@ export type NzAlign = 'top' | 'middle' | 'bottom';
'[class.ant-row-center]': `nzJustify === 'center'`,
'[class.ant-row-space-around]': `nzJustify === 'space-around'`,
'[class.ant-row-space-between]': `nzJustify === 'space-between'`,
'[class.ant-row-space-evenly]': `nzJustify === 'space-evenly'`,
'[class.ant-row-rtl]': `dir === "rtl"`
}
})
Expand Down
16 changes: 10 additions & 6 deletions components/page-header/demo/actions.ts
Expand Up @@ -7,9 +7,11 @@ import { Component } from '@angular/core';
<nz-page-header-title>Title</nz-page-header-title>
<nz-page-header-subtitle>This is a subtitle</nz-page-header-subtitle>
<nz-page-header-extra>
<button nz-button>Operation</button>
<button nz-button>Operation</button>
<button nz-button nzType="primary">Primary</button>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content>
<nz-descriptions nzSize="small" [nzColumn]="3">
Expand All @@ -31,9 +33,11 @@ import { Component } from '@angular/core';
<nz-tag nzColor="blue">Runing</nz-tag>
</nz-page-header-tags>
<nz-page-header-extra>
<button nz-button>Operation</button>
<button nz-button>Operation</button>
<button nz-button nzType="primary">Primary</button>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content>
<nz-row nzType="flex">
Expand Down
22 changes: 16 additions & 6 deletions components/page-header/demo/content.ts
Expand Up @@ -29,12 +29,22 @@ import { Component } from '@angular/core';
<!--extra-->
<nz-page-header-extra>
<button nz-button>Operation</button>
<button nz-button>Operation</button>
<button nz-button nzType="primary">Primary</button>
<button nz-button nzNoAnimation nz-dropdown [nzDropdownMenu]="menu" style="border: none; padding: 0">
<i nz-icon nzType="ellipsis" nzTheme="outline" style="font-size: 20px; vertical-align: top;"></i>
</button>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
<button
*nzSpaceItem
nz-button
nzNoAnimation
nz-dropdown
[nzDropdownMenu]="menu"
nzPlacement="bottomRight"
style="border: none; padding: 0"
>
<i nz-icon nzType="more" nzTheme="outline" style="font-size: 20px; vertical-align: top;"></i>
</button>
</nz-space>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item>1st menu item length</li>
Expand Down
8 changes: 5 additions & 3 deletions components/page-header/demo/ghost.ts
Expand Up @@ -8,9 +8,11 @@ import { Component } from '@angular/core';
<nz-page-header-title>Title</nz-page-header-title>
<nz-page-header-subtitle>This is a subtitle</nz-page-header-subtitle>
<nz-page-header-extra>
<button nz-button>Operation</button>
<button nz-button>Operation</button>
<button nz-button nzType="primary">Primary</button>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content>
<nz-descriptions nzSize="small" [nzColumn]="3">
Expand Down
4 changes: 3 additions & 1 deletion components/page-header/demo/module
Expand Up @@ -10,6 +10,7 @@ import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzStatisticModule } from 'ng-zorro-antd/statistic';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { NzSpaceModule } from 'ng-zorro-antd/space';

export const moduleList = [
NzPageHeaderModule,
Expand All @@ -23,5 +24,6 @@ export const moduleList = [
NzDropDownModule,
NzIconModule,
NzStatisticModule,
NzGridModule
NzGridModule,
NzSpaceModule
];
8 changes: 5 additions & 3 deletions components/page-header/demo/responsive.ts
Expand Up @@ -7,9 +7,11 @@ import { Component } from '@angular/core';
<nz-page-header-title>Title</nz-page-header-title>
<nz-page-header-subtitle>This is a subtitle</nz-page-header-subtitle>
<nz-page-header-extra>
<button nz-button>Operation</button>
<button nz-button>Operation</button>
<button nz-button nzType="primary">Primary</button>
<nz-space>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button>Operation</button>
<button *nzSpaceItem nz-button nzType="primary">Primary</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content>
<div class="content">
Expand Down

0 comments on commit 018fdeb

Please sign in to comment.