当前位置: 首页 > news >正文

徐州建筑网站了解网站开发的一般过程

徐州建筑网站,了解网站开发的一般过程,密云网站建设服务,查工程项目的网站自己的项目要写一个竖栏菜单#xff0c;所以记录一下思路吧#xff0c;先粗糙的实现一把#xff0c;有机会再把细节修饰一下 功能上就是无论这个菜单有多少层级#xff0c;都能显示出来#xff0c;另外#xff0c;需要带图标#xff0c;基于element-plus写成#xff0…自己的项目要写一个竖栏菜单所以记录一下思路吧先粗糙的实现一把有机会再把细节修饰一下 功能上就是无论这个菜单有多少层级都能显示出来另外需要带图标基于element-plus写成当这个菜单栏点开的时候最好整个页面的高度不要有变化最后整成了个小草稿 MyMenu.vue template!-- 自己写的竖栏菜单组件 --!-- el-menu styleheight: 100%;width:100% --el-scrollbar max-height100%el-menu stylewidth: 100%;border: 0; unique-opened :default-activeprops.defaultIndex active-text-color#ffd04bbackground-color#545c64 text-color#fffMenuTree :menu-dataprops.data/MenuTree/el-menu/el-scrollbar /template script langts setup import MenuTree from ./MenuTree.vue const propsdefineProps{data:Arrayany,defaultIndex:string}() /script 里面有个递归组件 MenuTree.vue template!-- 递归组件 --!-- 为了创建无限菜单而使用 --template v-forvalue in props.menuData!-- 没有children就是一个单标签 --el-menu-item v-if!value.children :indexvalue.indextemplate v-ifvalue.iconcomponent :isvalue.icon stylewidth: 1rem;/component/template{{ value.title }}/el-menu-item!-- 多标签的情况 --el-sub-menu v-else :indexvalue.indextemplate #titletemplate v-ifvalue.iconcomponent :isvalue.icon stylewidth: 1rem;/component/template span{{ value.title }}/span/templateMenuTree :menuDatavalue.children/MenuTree/el-sub-menu/template /template script setup langts import MenuTree from ../Page1/MenuTree.vue const propsdefineProps{menuData:Arrayany}() /script 最后写个参数挂载一下我这边用的icon是element-plus组件自带的 templateel-container styleheight: 100vh;el-header stylepadding: 0;height: 5rem;div styleheight: 100%;background-color:pinkspanwelcome to page1/spanbr /span该页面用来写一个竖版menu/span/div/el-headerel-container styleheight: calc(100vh - 5rem);el-aside width15% stylebackground-color:lightblue;MyMenu :datamenuData :default-indexdefaultIndex//el-asideel-main stylebackground-color:rgb(246, 199, 11);component :isiconStr stylewidth: 1rem;/component/el-main/el-container/el-container /template script setup langts import {ref} from vue import { Search,Select,Close,User } from element-plus/icons-vue; import MyMenu from ./MyMenu.vue; let menuData [{title: 睡觉,index: 0,icon: Select},{title: 游戏,index: 1,icon: Search,children: [{title: 上古卷轴,index: 1-1,children: [{title: 上古卷轴匕首雨,index: 1-1-1,},{title: 上古卷轴天际,index: 1-1-2,icon: Select}]},{title: 辐射,index: 1-2,children: [{title: 龙万德,index: 1-2-1},{title: 辐射新维加斯,index: 1-2-2}]}]},{title: 美食,index: 2,icon: Close,children: [{title: 淮扬菜,index: 2-1,children: [{title: 红烧狮子头,index: 2-1-1},{title: 猪头肉,index: 2-1-2},]},{title: 川菜,index: 2-2,children: [{title: 四川泡菜,index: 2-2-1},{title: 水煮鱼,index: 2-2-2},{title: 开水白菜,index: 2-2-3},]},{title: 粤菜,index: 2-3,children: [{title: 白切鸡,index: 2-3-1},{title: 顺德鱼生,index: 2-3-2},{title: 猪肚鸡,index: 2-3-3},]}]},{title: 编程,index: 3,icon: User,children: [{title: golang,index: 3-1,children: [{title: 云原生,index: 3-1-1},{title: gin,index: 3-1-2}]},{title: js,index: 3-2},{title: python,index: 3-3}]} ] // 默认index值 let defaultIndex ref(0) /script 主要过程就是写了一个递归的菜单栏然后用el-scrollbar包装了一下以免这个菜单展开的时候把盒子高度撑开。 细节上难看了一点此外我觉得整个菜单的高度应该和传入数组的最大深度相关得把这个el-scrollbar组件换掉才行先写着有时间完善。
http://www.hkea.cn/news/14357155/

相关文章:

  • ps建设此网站的必要与可行性设计人才网站
  • 如何检查网站是否做cdn加速网站建设收费标准不一
  • 做网站的是什么职业wordpress 好seo吗
  • 织梦新手网站建设青岛做公司网站的多吗
  • 国内购物网站排名小说网站建设方案书ppt模板
  • 专门做dm单的网站电商网站建设特色
  • 怎么做一个简易网站北京宣传片
  • 网站建设制作培训如何优化关键词搜索
  • 免费舆情网站网站开发入什么科目
  • 深圳租赁住房和建设局网站分销商城网站开发
  • wordpress汉化手机版镇江网站建设优化
  • 资源网站优化排名优化做彩票网站网址
  • 比利时网站后缀公司注册地址是什么
  • 建网站找哪家公司xml格式文件打开都是乱码
  • 外贸网站seo推广企业网站的页面布局
  • 华亚快印网站开发满分作文网站
  • 记事本做网站怎样学做网站
  • 网站建设网站公司的序wordpress 注册 登录界面
  • 湛江网站设计做电脑回收什么网站好
  • 凤台做网站动画做a视频在线观看网站
  • php建站软件哪个好常州网络推广seo
  • 怎么用wordpress建立自己的网站吗python前端开发需要学哪些东西
  • 一般网站要多大空间wordpress 网店模板
  • 做网站产生的流量费怎么算建筑工程 网络图
  • 网站建设主要问题做电池网站的引导页
  • 长春电商网站建设公司wordpress 登入 跳
  • wap网站模板下载西安有哪些大公司
  • 网站建设包括哪些方面?定制开发网站
  • 网站域名怎么做分录电子商务与网络营销论文
  • 网站文章优化网站的动态是什么意思