搜索
博主信息
博文 62
粉丝 3
评论 1
访问量 41272
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
vue的element应用
kiraseo_wwwkiraercom
原创
753人浏览过

安装前要首先安装好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安装后的效果-后台管理系统首页搭建

后台管理系统 列表页搭建



添加和编辑


批改老师:PHPzPHPz

批改状态:合格

老师批语:
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学