Element: import css bug?

Created on 1 Jan 2017  ·  3Comments  ·  Source: ElemeFE/element

  • 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

Most helpful comment

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

All 3 comments

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chao-hua picture chao-hua  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

akaylh picture akaylh  ·  3Comments

fscardua picture fscardua  ·  3Comments

zhguokai picture zhguokai  ·  3Comments