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

import css bug? #2142

Closed
yuchonghua opened this issue Jan 1, 2017 · 3 comments
Closed

import css bug? #2142

yuchonghua opened this issue Jan 1, 2017 · 3 comments

Comments

@yuchonghua
Copy link
Contributor

  • Install the template
vue init ddvs/nuxt testeui&&cd testeui&&npm i
  • Enter debug mode
npm run dev

This time we can normally open http://127.0.0.1:3000/admin

Because css is the introduction of such

image

But when I recommend the introduction of being given the wrong way
element-ui init doc

image

This is a nuxt.js the bugs? Or the distribution of the problem I myself

@Atinux
Copy link

Atinux commented Jan 2, 2017

This is from Nuxt.js because we use vue-loader and Vue files, so importing CSS in the <script> block does not work.

Maybe it can be nice to explain it that if the user use vue-loader, it should not import the CSS in the script block? http://element.eleme.io/#/en-US/component/quickstart#import-element

@lincenying
Copy link

ssr下, 不要在script里import css文件, 可以在style标签里@import

nuxt下, css文件可以在nuxt.config.js里配置

https://github.com/nuxt/nuxt.js/blob/master/examples/global-css/nuxt.config.js

@yuchonghua
Copy link
Contributor Author

@QingWei-Li 这样的话ElemeFE/mint-ui也要改掉样式应用了?我该如何修改呢

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

4 participants