npm install element-plus
一丶main.js里配置:
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// import ElementPlus from 'element-plus'
import "element-plus/dist/index.css";
import { components } from "./plugins/element";
const app = createApp(App);
for (const cpn of components) {
app.component(cpn.name, cpn);
}
app.use(store);
app.use(router);
// app.use(ElementPlus)
app.mount("#app");