mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
✅ Fix carousel react 15 support
This commit is contained in:
parent
d45d494a4b
commit
e5a83dd884
@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { Settings } from 'react-slick';
|
||||
import { polyfill } from 'react-lifecycles-compat';
|
||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||
import warning from '../_util/warning';
|
||||
|
||||
@ -21,8 +22,7 @@ if (typeof window !== 'undefined') {
|
||||
// make sure matchMedia polyfill run before require('react-slick')
|
||||
// Fix https://github.com/ant-design/ant-design/issues/6560
|
||||
// Fix https://github.com/ant-design/ant-design/issues/3308
|
||||
const SlickCarousel = require('react-slick').default;
|
||||
|
||||
const SlickCarousel = polyfill(require('react-slick').default);
|
||||
export type CarouselEffect = 'scrollx' | 'fade';
|
||||
export type DotPosition = 'top' | 'bottom' | 'left' | 'right';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user