摘要: localStorage.setItem( key, val) localStorage.getItem( key) localStorage[key] = JSON.stringify(数组); data = JSON.parse(localStorage[key]); localStorage. 阅读全文
posted @ 2017-10-13 21:20 静静的fire 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 点击按钮列表页随机获取三个商品并渲染 后台返回的数据为 d为一个数组 数组 arr=[0,1,2]初始值 data:{ list:d, arr:[0,1,2] } 生产随机数 渲染 1 <li v-for="index in arr" > 2 {{list[index].title}} 3 </li 阅读全文
posted @ 2017-10-13 17:52 静静的fire 阅读(2038) 评论(0) 推荐(0) 编辑