父组件:
<cus-list
ref="mdlist"
:row-line="1"
:is-page="false"
:list-data="chargeDetailList"
mode="checkbox"
>
<template v-slot:item="{ row, index }">
<text class="item-content">
插槽内容
</text>
</template>
</cus-list>
子组件(cus-list):
<template>
<view>
<view v-for="(item, index) in list" class="cm-citem-wrap" :key="index">
item - {{index}} - <slot name="item" :row = "item" :index = "index" ></slot>
</view>
</view>
</template>
4***@qq.com (作者)
已上传示例代码,请下载重现,操作如下:
1)启动示例,显示首页:页面1(刚启动渲染是正常的)
2)打开pages.json,删除页面2的路由配置,保存触发重新渲染,bug出现:页面1插槽内容无法显示
3)若未出现bug,复原页面2路由,重复以上操作,多试几次就会出现!
2021-01-14 17:04
4***@qq.com (作者)
回复 4***@qq.com: 我的hbx、微信开发工具都是最新版本
2021-01-14 17:05