1、vue2
中使用npm
引入element-ui
npm install element-ui --save
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.config.productionTip = false;
Vue.use(Element);
new Vue({
router,
store,
render: (h) => h(App),
}).$mount("#app");
2、vue3
中使用npm
引入element-plus
npm install element-plus --save
import { createApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import router from "./router";
import "./assets/main.css";
import ElementUI from "element-plus";
import "element-plus/theme-chalk/index.css";
const app = createApp(App);
app.use(createPinia());
app.use(router);
app.use(ElementUI)
app.mount("#app");
发布时间 : 2023-03-01,阅读量:1561
, 分类:
Npm
Element-UI