vue实现后台管理系统多iframe的tab选项卡标签多级菜单效果代码
代码语言:html
所属分类:布局界面
代码描述:vue实现后台管理系统多iframe的tab选项卡标签多级菜单效果代码,点击左侧菜单可在新的iframe选项卡tab中打开页面,还可以关闭tab选项卡,左侧菜单还可折叠。
代码标签: vue 后台 管理 系统 iframe tab 选项卡 标签 多级 菜单
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>左侧导航栏</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <style> * { padding: 0; margin: 0; } .page .nav-left { position: absolute; top: 0; height: 100%; width: 240px; background-color: #FFFFFF; box-shadow: 10px 0px 17px rgba(72, 72, 72, 0.1); transition: all .5s; z-index: 100; /* overflow: hidden; */ } .page .nav-left .LogoName { text-align: center; line-height: 70px; font-size: 20px; font-weight: 700; color: #6d61ea; letter-spacing: 0.05em; } .page .nav-left .navDiv .navName { padding: 12px 20px !important; letter-spacing: 0.05em; font-size: 11px; color: #5a5454; font-weight: 700; } .page .nav-left .navDiv .nav-list ul .a_active { background-color: #f2f0f8; } .page .nav-left .navDiv .nav-list ul .a_active .active { color: #6d61ea !important; font-weight: 700; } .page .nav-left .navDiv .nav-list ul .nav-tab { list-style: none; } .page .nav-left .navDiv .nav-list ul .nav-tab .li-a { padding: 12px 15px 12px 25px !important; text-decoration: none; display: block; padding: 0.65rem 1.5rem; font-size: 14px; color: #5a5454; } .page .nav-left .navDiv .nav-list ul .nav-tab .li-a .bx { font-size: 17px; vertical-align: text-top; margin-right: 6px; } .page .nav-left .navDiv .nav-list ul .nav-tab .nav-box { height: 0; overflow: hidden; } .page .nav-left .navDiv .nav-list ul .nav-show .nav-box { height: auto !important; padding-bottom: 12px; transition: all 0.6s; } .page .nav-left .navDiv .nav-list ul .nav-show .nav-box a { padding: 5px 70px !important; text-decoration: none; display: block; padding: 0.65rem 1.5rem; font-size: 13px; color: #5a5454; transition: all 0.3s; margin-left: 0px; } .page .nav-left .navDiv .nav-list ul .nav-show .nav-box .active-li-a { color: #6d61ea !important; font-weight: 700; } .page .nav-left .navDiv .nav-list ul .nav-show .nav-box a:hover { margin-left: 6px; } .page .nav-left .navDiv .nav-list .li-a { transition: all 0.8s; margin-left: 0px; } .page .nav-left .navDiv .nav-list .li-a:hover { margin-left: 6px; } .page .nav-right { display: flex; flex-direction: column; padding-left: 240px; transition: all .5s; z-index: 200; } .page .nav-top { flex: 1; height: 100px; width: 100%; padding: 20px 20px 0 0px; background-color: #FFFFFF; box-shadow: 10px 0px 17px rgba(72, 72, 72, 0.2); z-index: 200; } .page .content-page { z-index: 200; flex: 1; position: absolute; top: 100px; left: 240px; right: 0; bottom: 0; transition: all .5s; background-color: #FFFFFF; margin: 15px; } .tabs-container { margin-bottom: 0; margin-top: 10px; } .tab { cursor: pointer; padding: 5px 25px; background: white; display: inline-block; position: relative; } .active-tab { background: rgb(226,224,251); } .add-tab { cursor: pointer; display: none; } .delete-btn { color: grey; position: absolute; top: 4px; right: 8px; cursor: pointer; } .delete-btn:hover { color: black; font-weight: bold; } iframe { display: none; /* Modified to hide all iframes by default */ } iframe.active { display: block; /* Only display the active iframe */ } </style> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css"> </head> <body> <div class="page" id="app"> <div class="nav-left" v-show="navLeftFlag" ref="navLeft"> <div class="LogoName"> Admin </div> <div class="navDiv"> <div class="navName">导航</div> <div class="nav-list"> <ul> <li v-for="(menu, index) in menus" :key="menu.url" :class="menu.isclose?'nav-tab nav-ul nav-show':'nav-tab nav-ul'"> <a v-if="menu.childs.length==0" @click="openTab(menu.url,menu.title)" href="javascript:void[0]" class="li-a"><i :class="'fa fa-lg '+menu.icon"></i> {{menu.title}} <i class='bx bx-chevron-right' style="float: right;"></i></a> <a v-if="menu.childs.length>0" @click="toggleMenu(index)" href="javascript:void[0]" class="li-a"><i :class="'fa fa-lg '+menu.icon"></i> {{menu.title}} <i :class="!menu.isclose?'fa fa-lg fa-angle-down':'fa fa-lg fa fa-lg fa-angle-up'" style="float: right;"></i></a> <div class="nav-box" style="display:block;" v-for="(submenu, subindex) in menu.childs" :key="submenu.url"> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0