fix: Fix carousel dotPosition not working (#20645)

close #20638
This commit is contained in:
xrkffgg 2020-01-03 16:53:17 +08:00 committed by 偏右
parent 8e1051daf5
commit a4ac7de4c5
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@ exports[`Carousel should works for dotPosition bottom 1`] = `
exports[`Carousel should works for dotPosition left 1`] = ` exports[`Carousel should works for dotPosition left 1`] = `
<div <div
class="ant-carousel" class="ant-carousel ant-carousel-vertical"
> >
<div <div
class="slick-slider slick-initialized" class="slick-slider slick-initialized"
@ -89,7 +89,7 @@ exports[`Carousel should works for dotPosition left 1`] = `
exports[`Carousel should works for dotPosition right 1`] = ` exports[`Carousel should works for dotPosition right 1`] = `
<div <div
class="ant-carousel" class="ant-carousel ant-carousel-vertical"
> >
<div <div
class="slick-slider slick-initialized" class="slick-slider slick-initialized"

View File

@ -109,6 +109,7 @@ export default class Carousel extends React.Component<CarouselProps, {}> {
const className = classNames(prefixCls, { const className = classNames(prefixCls, {
[`${prefixCls}-rtl`]: direction === 'rtl', [`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-vertical`]: dotPosition === 'left' || dotPosition === 'right',
}); });
return ( return (