Blogger Information
Blog 62
fans 3
comment 1
visits 29719
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
vue的element应用
kiraseo_wwwkiraercom
Original
531 people have browsed it

安装前要首先安装好vue (具体教程看安装vue教程

使用yarn命令 来element

  1. yarn add element-plus

在vue项目中的main.js文件添加如下代码

  1. import { createApp } from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import store from './store'
  5. //这是element 添加的必须要代码
  6. import ElementPlus from "element-plus";
  7. import "element-plus/dist/index.css";
  8. import * as ElementPlusIconsVue from "@element-plus/icons-vue";
  9. const app = createApp(App);
  10. for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  11. app.component(key, component);
  12. }
  13. //.use(ElementPlus, { size: "small", zIndex: 3000 }) 这也是必须要写入,不然在使用elemenui会没有样式的 一定要添加
  14. createApp(App).use(store).use(router).use(ElementPlus, { size: "small", zIndex: 3000 }).mount('#app')

使用element安装后的效果-后台管理系统首页搭建

后台管理系统 列表页搭建



添加和编辑


Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post