在首页引入基金组件,代码如下
import FundItem from '@/components/item'
然后在components对象中给组件声明ID,代码如下
components = {FundItem}
接着在<template>里使用<repeat>循环渲染基金组件,关键代码如下
<view class="fund-list"><repeat for="{{myFund.funds}}" key="index" index="index" item="item"><FundItem :listData="item"></FundItem></repeat></view>

