|
本帖最后由 zengfp 于 2018-7-19 16:49 编辑
- hotGoods: [
- { goods_image: '../assets/hufushuang.png', goods_title: '护肤霜', goods_price: '19.9', detail_url: '' },
- { goods_image: '../assets/gouwudai.png', goods_title: '购物袋', goods_price: '39.9', detail_url: '' },
- { goods_image: '../assets/hufushuang.png', goods_title: '护肤霜', goods_price: '19.9', detail_url: '' },
- { goods_image: '../assets/gouwudai.png', goods_title: '购物袋', goods_price: '39.9', detail_url: '' },
- ],
复制代码- <template>
-
- <div class="category">
-
-
- <text>下面是for循环</text>
- <div class="content-item" for="{{hotGoods}}">
- <text>使用for循环</text>
- <text>{{$idx}}</text>
- </div>
-
- </div>
-
- </template>
复制代码
|
|