在Vue2项目中引入ElementUI详细步骤

1.使用npm安装ElementUI,安装好后在package.json文件查找element-ui是否安装好

npm i element-ui -S

在Vue2项目中引入ElementUI详细步骤_第1张图片

2.在main.js中引入element-ui

import Vue from "vue";
import App from "./App.vue";

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.config.productionTip = false;

Vue.use(ElementUI)
new Vue({
  render: (h) => h(App),
}).$mount("#app");

element-ui官网组件地址:https://element.eleme.cn/#/zh-CN/component/installation

你可能感兴趣的:(在Vue2项目中引入ElementUI详细步骤)