Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
yarn add element-plus
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//这是element 添加的必须要代码
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
//.use(ElementPlus, { size: "small", zIndex: 3000 }) 这也是必须要写入,不然在使用elemenui会没有样式的 一定要添加
createApp(App).use(store).use(router).use(ElementPlus, { size: "small", zIndex: 3000 }).mount('#app')