Browse Source

fix: Fix carousel dotPosition not working (#20645)

close #20638
pull/20650/head
xrkffgg 5 years ago
committed by 偏右
parent
commit
a4ac7de4c5
  1. 4
      components/carousel/__tests__/__snapshots__/index.test.js.snap
  2. 1
      components/carousel/index.tsx

4
components/carousel/__tests__/__snapshots__/index.test.js.snap

@ -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"

1
components/carousel/index.tsx

@ -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 (

Loading…
Cancel
Save