From 0800063f34da538e47491ae47c73d25e42020970 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Thu, 9 Jan 2020 10:23:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Carousel=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20left/right=20=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E8=BD=AE=E6=92=AD=E6=96=B9=E5=90=91=20(#2078?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复 Carousel 组件 left/right 模式下卡片轮播方向 * fix: snap * add: test * remove: unnecessary code --- .../carousel/__tests__/__snapshots__/index.test.js.snap | 4 ++-- components/carousel/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/carousel/__tests__/__snapshots__/index.test.js.snap b/components/carousel/__tests__/__snapshots__/index.test.js.snap index 0cd05b6ab9..0285452d38 100644 --- a/components/carousel/__tests__/__snapshots__/index.test.js.snap +++ b/components/carousel/__tests__/__snapshots__/index.test.js.snap @@ -58,7 +58,7 @@ exports[`Carousel should works for dotPosition left 1`] = ` class="ant-carousel ant-carousel-vertical" >
{ const prefixCls = getPrefixCls('carousel', props.prefixCls); const dotsClass = 'slick-dots'; const dotPosition = this.getDotPosition(); + props.vertical = dotPosition === 'left' || dotPosition === 'right'; props.dotsClass = `${dotsClass} ${dotsClass}-${dotPosition || 'bottom'}`; const className = classNames(prefixCls, { [`${prefixCls}-rtl`]: direction === 'rtl', - [`${prefixCls}-vertical`]: dotPosition === 'left' || dotPosition === 'right', + [`${prefixCls}-vertical`]: props.vertical, }); return (