forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
placement.ts
33 lines (31 loc) 路 1.06 KB
/
placement.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Component } from '@angular/core';
import { NzSelectPlacementType } from 'ng-zorro-antd/select';
@Component({
selector: 'nz-demo-select-placement',
template: `
<nz-radio-group [(ngModel)]="placement">
<label nz-radio-button nzValue="topLeft">topLeft</label>
<label nz-radio-button nzValue="topRight">topRight</label>
<label nz-radio-button nzValue="bottomLeft">bottomLeft</label>
<label nz-radio-button nzValue="bottomRight">bottomRight</label>
</nz-radio-group>
<br />
<br />
<nz-select [(ngModel)]="selectedValue" [nzDropdownMatchSelectWidth]="false" [nzPlacement]="placement">
<nz-option nzValue="HangZhou" nzLabel="HangZhou #310000"></nz-option>
<nz-option nzValue="NingBo" nzLabel="NingBo #315000"></nz-option>
<nz-option nzValue="WenZhou" nzLabel="WenZhou #325000"></nz-option>
</nz-select>
`,
styles: [
`
nz-select {
width: 120px;
}
`
]
})
export class NzDemoSelectPlacementComponent {
placement: NzSelectPlacementType = 'topLeft';
selectedValue = 'HangZhou';
}