vue 点击切换变色 tab 改变class 跳转链接
来源:互联网 发布:分析淘宝网的特点 编辑:程序博客网 时间:2024/06/03 19:41
vue 点击切换变色 tab 改变class
1.
<section id='foot_guide'> <div v-for="(item,index) in footlist" :key="index" @click="gotoAddress({path:item.path},index)" class="guide_item" :class="{active: activeIndex == index}"> <svg class="icon" aria-hidden="true"> <use v-bind:xlink:href="item.svg"></use> </svg> <div>{{item.name}}</div> </div> </section>
2.
data(){ return { footlist: [ { name: '首页', path: '/msite', svg: '#icon-shouye2' }, { name: '个人中心', path: '/profile', svg: '#icon-user' } ], activeIndex: 0, } }, methods: { gotoAddress(path, index){ this.$router.push(path); this.activeIndex = index } },3.
.active div { color: #FFBC00; } .active svg use { fill: #FFBC00; }
阅读全文
0 0
- vue 点击切换变色 tab 改变class 跳转链接
- Vue实现点击后文字变色切换
- vue toggle做一个点击切换class
- vue里如何实现tab类似的切换class?
- Vue实现tab切换
- vue tab切换
- vue tab 切换
- vue tab 切换
- vue tab切换
- vue--切换class
- vue刷新和tab切换
- vue实现自动切换tab
- vue实现一个tab切换
- vue ios系统 微信浏览器tab切换的时候点击两次
- vue实现tab切换外加样式切换
- vue tab切换 (动态数据切换)
- 点击图片,跳转链接
- tab切换——点击
- 深度学习与神经网络-吴恩达(Part1Week4)-深度神经网络编程实现(python)-基础篇
- Docs » Learning the ArduPilot Codebase » EKF » Extended Kalman Filter Navigation Overview and Tuning
- 笔记==>map
- Laravel 5+ Bootstrap 4 分页器
- 【龙芯1c库】封装硬件SPI接口和使用示例
- vue 点击切换变色 tab 改变class 跳转链接
- 主成分分析(PCA)原理及推导
- 润乾报表 echarts统计图如何使用自定义主题
- 每日一练20171025
- 【jQuery】事件
- VM下的CentOs如何联网?
- jquery.rotate.js可选抽奖次数和中奖内容的转盘抽奖demo
- c++定义结构体队列
- NestedScrollView+RecyclerView优雅的解决滑动冲突问题