-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
按需引入Carousel组件,没有效果 #271
Labels
Comments
https://github.com/ant-design/babel-plugin-import |
lib下组件问题将在下个版本修复 |
tangjinzhou
added a commit
that referenced
this issue
Nov 22, 2018
好的谢谢!在nuxt中暂时用plugin引入es的carousel解决了 |
1.1.9已修复 |
好了,谢谢! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
1.1.8
Environment
macOS Mojave 10.14.1; Chrome 70.0.3538.77; Vue 2.5.17
Reproduction link
Steps to reproduce
https://codesandbox.io/s/v8j37m6km3
如上按需引用Carousel组件
What is expected?
可以正常render
What is actually happening?
没有正常render
我是在nuxt中按需加载发现的问题,在CodeSandbox中也能复现:
经过问题排查,在/components/carousel/index.jsx中找到:
发现赋值SlickCarousel成了undefined,导致不能正常render。
如果
import SlickCarousel from '../vc-slick/src'
这样写好像可以,但不确定会不会因为import在打包过程中将代码提前,引起注释中提到的matchMedia not present, legacy browsers require a polyfill问题。The text was updated successfully, but these errors were encountered: