-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:drawer): support top and bottom placement (#2039)
close #2015
- Loading branch information
Showing
10 changed files
with
176 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
order: 1 | ||
title: | ||
zh-CN: 自定义位置 | ||
en-US: Custom Placement | ||
--- | ||
|
||
## zh-CN | ||
|
||
自定义位置,点击触发按钮抽屉从相应的位置滑出,点击遮罩区关闭 | ||
|
||
## en-US | ||
|
||
Basic drawer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-drawer-placement', | ||
template: ` | ||
<nz-radio-group [(ngModel)]="placement"> | ||
<label nz-radio nzValue="top">top</label> | ||
<label nz-radio nzValue="right">right</label> | ||
<label nz-radio nzValue="bottom">bottom</label> | ||
<label nz-radio nzValue="left">left</label> | ||
</nz-radio-group> | ||
<button nz-button nzType="primary" (click)="open()">Open</button> | ||
<nz-drawer [nzClosable]="false" [nzVisible]="visible" [nzPlacement]="placement" nzTitle="Basic Drawer" (nzOnClose)="close()"> | ||
<p>Some contents...</p> | ||
<p>Some contents...</p> | ||
<p>Some contents...</p> | ||
</nz-drawer> | ||
` | ||
}) | ||
|
||
export class NzDemoDrawerPlacementComponent { | ||
|
||
visible = false; | ||
placement = 'left'; | ||
open(): void { | ||
this.visible = true; | ||
} | ||
|
||
close(): void { | ||
this.visible = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters