vue 三级控制

本文介绍了如何使用Vue.js实现三级联动效果,包括HTML结构布局、CSS样式设置以及JavaScript逻辑实现。请注意在JS部分正确引入Vue.js库。
摘要由CSDN通过智能技术生成

1、html代码

<div id="app" class="container">
        <div class="heade-box">
            <div class="header">
                <img src="images/logo.png" height="110" width="312">
                <ul class="header-cont">
                    <li v-for="one in menu" @click="currentMenu(one)" :class="{liActive:current.title==one.title}">
                        <img :src="one.icon" height="26" width="26">
                        <p>{
   {
   one.title||''}}</p>
                    </li>
                </ul>
                <div class="header-right">
                    <p class="header-touxiang">
                        <img src="images/touxiang.png" height="36" width="36">
                        <span>管理员</span>
                    </p>
                    <p class="header-back">
                        <a href="###">退出</a>
                    </p>
                </div>
            </div>
        </div>
        <ul class="subnav" v-if="current.childs&&current.childs.length>0">
            <li v-for="two in current.childs" @click="currentSecMenu(two)" :class="{subActive:two.title==currentTow.title}">
                <span>{
   {
   two.title||''}}</span>
                <img v-if="two.title==currentTow.title" src="images/arrowTop.png" height="7" width="14">
            </li>
        </ul>
        <div class="content" v-if="currentTow.childs&&currentTow.childs.length>0">
            <div class="content-left">
                <ul class="contentLeft-title">
                    <li v-for="three in currentTow.childs" @click="currentThree=three" :class="{leftActive:three.title==currentThree.title}">
                        <a :class="{leftHref:three.title==currentThree.title}" target="iframe" :href="three.href">
                            <b :class<
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值