2020年4月27日
摘要: 我们可以看到所有的地址都是点亮的状态,就是外面都有个橙色的框。我们需要把默认地址,才设置为点亮的状态。 1、新建变量 checkedIndex,默认为 0,然后把遍历地址列表,把字段 isDefault 为 true 的地址索引赋值给 checkedIndex data() { return { c 阅读全文
posted @ 2020-04-27 16:22 JoeYoung 阅读(989) 评论(0) 推荐(0) 编辑
摘要: 1、要求默认只展示3个地址,其他地址点击查看更多展开 通过使用过滤器,并定义变量 limit:3,然后循环渲染 addrFilter 数组 <li class="check" v-for="item in addrFilter" :key="item.addressId"> <script> exp 阅读全文
posted @ 2020-04-27 11:03 JoeYoung 阅读(282) 评论(0) 推荐(0) 编辑