Home > Article > Web Front-end > How to use vue-cli to import Element UI components
This time I will show you how to use vue-cli to import Element UI components. What are the precautions when using vue-cli to import Element UI components? Here are practical cases, let’s take a look.
First step, now enter npm i element-ui
in the command line, such as:
and then in main.js Add
import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' Vue.use(ElementUI)
such as:=>
Finally enter npm run dev
on the command line to open the project you created. Using
, I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading
How to use AngularJS custom filter usage
How to use JS to implement paging printing
The above is the detailed content of How to use vue-cli to import Element UI components. For more information, please follow other related articles on the PHP Chinese website!