<html>
<meta charset="utf-8">
<head>
<script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
</head>
<body>
<div id="app">
<ul v-show="flag==1">
<li v-for="item in lists.slice(0,3)">{{item.name}}</li>
</ul>
<ul v-show="flag==2">
<li v-for="item in lists.slice(3,7)">{{item.name}}</li>
</ul>
<ul v-show="flag==3">
<li v-for="item in lists.slice(7)">{{item.name}}</li>
</ul>
<button v-on:click="changeflag">换一换</button>
</div>
</body>
<script>
new Vue({
el:'#app',

data(){
return{
flag:1,
count:1,
lists:[
{name:"push()"},
{name:"pop()"},
{name:"shift()"},
{name:"unshift()"},
{name:"splice()"},
{name:"sort()"},
{name:"reverse()"},
{name:"shift()"},
{name:"unshift()"},
{name:"splice()"},
{name:"sort()"},
{name:"reverse()"},
]
}
},
methods:{

changeflag(){
this.count++;
if(this.count>3){
this.count=1;
}
this.flag=this.count;
}
}
})
</script>
</html>

最新文章

  1. 用JavaScript实现的选项卡
  2. JSON: Property &#39;xxx&#39; has no getter method的解决办法
  3. git svn clone时间估算
  4. node(邮件发送特性)
  5. 解决Hibernate向MySQL数据库插入中文乱码问题
  6. 如何设置iframe高度自适应,在跨域的情况下能做到吗?
  7. [leetcode]Find Minimum in Rotated Sorted Array @ Python
  8. 怎样解决asp.net.mvc上传附件超过长度问题?
  9. Sqlserver_In、exists使用
  10. TC SRM 593 DIV1 250(dfs)
  11. BZOJ 1854 游戏
  12. 使用ItextSharp产PDF完整操作
  13. 【Demo 0001】Java基础-数据类型
  14. PE文件格式详解(上)
  15. Robots协议
  16. thinkphp中fetch渲染模板的处理
  17. WPF自定义命令和处发命令
  18. Mybatis操作oracle数据库的一些坑
  19. python多线程学习二
  20. 微信小程序基础

热门文章

  1. web安全-密码安全
  2. php 顺序线性表
  3. 详解linux下批量替换文件内容的三种方法(perl,sed,shell)
  4. 黑马学习CSS之选择器 简单选择器,结合符,选择器,选择器组, 选择器优先级,名称空间
  5. C#学习之按钮点击事件
  6. N - 嘤嘤嘤 (并查集+枚举)
  7. [例] 用MappedByteBuffer更新文件内容
  8. NorFlash基础
  9. php composer php amqplib
  10. JavaScript trim 实现去除字符串首尾指定字符的简单方法