Skip to content

Commit

Permalink
fix(module: carousel): fix carousel has one item width error. (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guoyuanqiang authored and fisherspy committed Jun 25, 2019
1 parent 5738327 commit 7ab3cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class CarouselComponent implements AfterViewInit, OnDestroy {
} else if (this._nodeArr.length === 1) {
setTimeout(() => {
this._nodeArr.forEach((v) => {
v.width = this._rationWidth - this.cellSpacing;
v.width = this.vertical ? 'auto' : this._rationWidth - this.cellSpacing;
v.left = 0;
v.top = 0;
v.margin = `auto ${this.cellSpacing / 2}px`;
Expand Down

0 comments on commit 7ab3cba

Please sign in to comment.