(编辑:jimmy 日期: 2024/11/17 浏览:2)
本文实例为大家分享了vue.js左边导航切换右边内容的具体代码,供大家参考,具体内容如下
<template> <div class="layout-container"> <y-header> <div slot="nav"></div> </y-header> <div class="w"> <div class="content"> <div class="account-sidebar"> <div class="gray-box "> <div class="box-inner"> <ul class="account-nav"> <li v-for="(item,i) in nav" :key='i'> <a href="javascript:;" > <div class="account-nav-primary" @click="tabPrimary(item)" :class="{active:item.isActive}"> <span>{{item.name}}</span> <i class="el-icon-arrow-right"></i> </div> </a> <div v-if="item.secondNav==true"> <ul class="account-nav-second" v-show="show"> <li v-for="(itemT,j) in item.navSecond" :key='j' :class="{active:itemT.name===title}" @click="tabSecond(itemT)"> <span>{{itemT.name}}</span> </li> </ul> </div> </li> </ul> </div> </div> <div class="gray-box sidebar-bottom content-center"> <div class="img-code"> <img src="/UploadFiles/2021-04-02/img-code.png">效果图:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。