vue tab 切换
来源:互联网 发布:汽车上哪里用单片机 编辑:程序博客网 时间:2024/05/22 04:26
<!DOCTYPE html><html><head><meta charset="utf-8" /><title></title><script src="https://cdn.bootcss.com/vue/2.4.2/vue.min.js"></script><style>*{margin:0;padding: 0;}.wrap{width:100%;}.wrap .nav{width:1200px;background: #c1c1c1;height:50px;margin:0 auto}.active{background:#fff;color:red;font-weight: bold;}.wrap .nav li{margin-left:230px;display: inline-block;line-height: 50px;padding:0 10px;cursor: pointer;}.div1{width:1200px;height:400px;background: yellow;margin:0 auto;margin-top:20px}.div2{width:1200px;height:400px;background: pink;margin:0 auto;margin-top:20px}.div3{width:1200px;height:400px;background: purple;margin:0 auto;margin-top:20px}</style></head><body><div id="total" class="wrap"><ul class="nav"><li @click="change(1)" v-bind:class="flag==1?'active' : ''">三角形</li><li @click="change(2)" v-bind:class="flag==2?'active' : ''">图片轮播</li><li @click="change(3)" v-bind:class="flag==3?'active' : ''">下拉菜单</li></ul><div class="div1" v-if="flag==1"></div><div class="div2" v-if="flag==2"></div><div class="div3" v-if="flag==3"></div></div><script>new Vue({ el:'#total', data:{ flag:1, }, methods:{ change:function(a){ this.flag=a; } }})</script></body></html>
vue高效导航切换以及class属性切换
阅读全文
0 0
- Vue实现tab切换
- vue tab切换
- vue tab 切换
- vue tab 切换
- vue tab切换
- vue刷新和tab切换
- vue实现自动切换tab
- vue实现一个tab切换
- vue实现tab切换外加样式切换
- vue tab切换 (动态数据切换)
- Vue.js实现tab切换效果
- 基于Vue的tab切换代码
- tab切换功能——vue
- Vue做类tab页切换
- vue组件学习5(tab切换)
- vue组件实现Tab切换功能
- vue里如何实现tab类似的切换class?
- vue中的tab切换(v-show,v-if)
- JSTL_C标签库
- c++实现String类(构造函数,析构函数,复制构造函数,各类运算符重载函数的编写)
- 配置git mergetool不产生*.orig文件
- 线程的和并发的路径
- 使用WebService获取第三方服务数据
- vue tab 切换
- 【Java】使用Java实现文件复制
- tensorflow练习10:判断男声女声
- ZOJ Problem Set
- 基于AWS使用深度学习的10个Linux命令
- easyui combobox动态绑定数据
- 第三方账号登陆还是自主账号登录?
- Vue不同组件之间相互传值
- 纯css水平三级导航栏