Skip to content
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

你好,请问如何把antd 替换为 @alifd/next #41

Closed
lijinshanmx opened this issue Apr 25, 2019 · 6 comments
Closed

你好,请问如何把antd 替换为 @alifd/next #41

lijinshanmx opened this issue Apr 25, 2019 · 6 comments

Comments

@lijinshanmx
Copy link

lijinshanmx commented Apr 25, 2019

我引入了@alifd/next以后,然后显示一个button,但是这个button没有css样式.所以我应该怎么解决一下,谢谢了~
import '@alifd/next/lib/button/style';
<Button type="primary" size="large"><Icon type="atm" />Large</Button>

@lijinshanmx
Copy link
Author

image

@lijinshanmx
Copy link
Author

换句话说,就是我使用的是阿里飞冰(ice works),里面用到的@alifd/next,是但是我想服务端来渲染,所以我想知道,ice works生成的项目,能不能用这个模板来改装,然后变成服务端渲染的?

@hubcarl
Copy link
Collaborator

hubcarl commented Apr 26, 2019

@lijinshanmx 可以的,只要 ice works 相关组件支持(组件里面服务端执行代码没有window,document 等之类)服务端渲染就行, 具体你可以试试,有问题可以随时反馈

@lijinshanmx
Copy link
Author

@hubcarl
image
image
我把@alifd/next的style配置在.babelrc,可是不生效,但是我看你们的antd都是这样引用的啊,如果我把css在jsx里面import,就可以生效了,所以我该怎么配置下

@lijinshanmx
Copy link
Author

就是我不想把那个next.css,放到jsx文件中引用,就是配置一下,然后全局使用就ok了.

@lijinshanmx
Copy link
Author

解决了,看来,这个项目库应该完全兼容飞冰的.
['babel-plugin-import', {
libraryName: '@alifd/next',
style: true
}]

@hubcarl hubcarl pinned this issue Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants