ElementUI styles don't show up

Here it is again, the same code, why is it different

In the ElementUI library:

 

After I copy and paste it into the vue file:

 See (12 messages) elment-ui imports on demand without styles_RDSunday's Blog-CSDN Blog_elementui imports on demand has no style

Finally, I remembered an operation in the pre-preparation in the video I watched: replace the content in element.js

  1. ​Find a complete list of components in the "Quick Start" in Element, copy
  2. In the Vue project, open element.js in the plugins folder, select all and paste, replace and save

If after you replace it, the compiler reports a lot of errors like mine, don’t be afraid, (if you are vsCode) right-click an error, one-click to automatically repair all problems, solve! I guess the root cause is because the ; in the list caused eslint discomfort haha.

Then, hey, look at mine: Effects come, and something new appears in Console Elements too

 

 References:

(12 messages) elment-ui imports on demand without styles_RDSunday's Blog-CSDN Blog_elementui imports on demand without styles

 

 

 

 

Guess you like

Origin blog.csdn.net/qq_54727445/article/details/128393307