福气嘎多
福气嘎多
  • 发布:2023-09-04 17:15
  • 更新:2023-09-04 17:15
  • 阅读:140

【报Bug】template在微信小程序端被编译为view标签

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Windows 11

第三方开发者工具版本号: 1.06.2306020

基础库版本号: 3.0.1

项目创建方式: CLI

CLI版本号: 3.0

示例代码:

组件

<view class="lists">  
        <template v-for="(item, index) in props.lists" :key="index">  
            <slot name="list" :item="item" :index="index" />  
        </template>  
        <slot name="otherList"/>  
    </view>

页面中使用

<s-list  
          v-model:lists="pageData.recommendLists"  
          ref="listChiRef"  
          :listFun="homeApi.recommend"  
          >  
            <template #list="{item,index}">  
              这个包括的template标签就会变为一个view标签  
            </template>  
</s-list>

操作步骤:

uniapp+vue3+vite cli生成的vue3项目,编译在h5没有问题,在小程序的时候template会被编译为view标签,而且还加不上样式

预期结果:

template根据文档所有不会作任何渲染

实际结果:

在小程序端渲染成了view标签

bug描述:

template在微信小程序端被编译为view标签

2023-09-04 17:15 负责人:无 分享
已邀请:

要回复问题请先登录注册