v-for 指令可以实现基于一个数组来渲染一个列表。
小程序1:
<view class="module">
<view class="help" v-for="(item,index) in shijian" :key="index">
<image :src="item.url"></image>
<view class="text">{{item.title}}</view>
</view>
</view>
vue3:
<!-- 卡片 -->
<div class="todo" v-for="(item,index) in todoList" :key="index">
<div>
<p class="theme">主题 <span class="content">{{item.wakeSubject}}</span></p>
<p class="theme">流程类别<span class="content">{{item.businessType}}</span></p>
<p class="theme">发起对象<span class="content">{{item.sendUserName}}</span></p>
</div>
</div>
const todoList = [{
wakeSubject:'nihao',
businessType:'liucheng',
sendUserName:"obj"
}]