[已删除]
[已删除]
  • 发布:2022-08-04 15:49
  • 更新:2022-08-10 15:20
  • 阅读:305

uniapp是不是暂时不支持在动态插槽的场景下绑定prop

分类:HBuilderX
<view v-for="(item,index) in 3" :key="index">  
    <slot :name="'title'+index" :content="{name:'标题'+index}">标题{{index}}</slot>  
</view>
<template title0="{ content }">  
        {{content}}  
</template>  

报如下错误:

15:44:28.954 (Emitted value instead of an instance of Error)   
15:44:28.955   Errors compiling template:  
15:44:28.955   v-slot 不支持动态插槽名  
2022-08-04 15:49 负责人:无 分享
已邀请:
DCloud_UNI_WZF

DCloud_UNI_WZF

vue2 配置 manifest.json-> mp-weixin-> "scopedSlotsCompiler":"augmented" 文档

要回复问题请先登录注册