-
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:carousel): support dot position (#3575)
* feat(module:carousel): support dot position * fix(module:carousel): fix content height in vertical mode * fix: typo
- Loading branch information
Showing
11 changed files
with
165 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
order: 1 | ||
title: | ||
zh-CN: 位置 | ||
en-US: Position | ||
--- | ||
|
||
## zh-CN | ||
|
||
位置有 4 个方向。 | ||
|
||
## en-US | ||
|
||
There are four positions available. | ||
|
||
|
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,42 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-carousel-position', | ||
template: ` | ||
<nz-radio-group [(ngModel)]="dotPosition"> | ||
<label nz-radio-button nzValue="bottom">Bottom</label> | ||
<label nz-radio-button nzValue="top">Top</label> | ||
<label nz-radio-button nzValue="left">Left</label> | ||
<label nz-radio-button nzValue="right">Right</label> | ||
</nz-radio-group> | ||
<nz-carousel [nzDotPosition]="dotPosition"> | ||
<div nz-carousel-content *ngFor="let index of array"> | ||
<h3>{{ index }}</h3> | ||
</div> | ||
</nz-carousel> | ||
`, | ||
styles: [ | ||
` | ||
nz-radio-group { | ||
margin-bottom: 8px; | ||
} | ||
[nz-carousel-content] { | ||
text-align: center; | ||
height: 160px; | ||
line-height: 160px; | ||
background: #364d79; | ||
color: #fff; | ||
overflow: hidden; | ||
} | ||
h3 { | ||
color: #fff; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoCarouselPositionComponent { | ||
array = [1, 2, 3, 4]; | ||
dotPosition = 'bottom'; | ||
} |
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
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
Oops, something went wrong.