嗨喔科技
嗨喔科技
  • 发布:2023-04-22 17:23
  • 更新:2023-04-22 17:23
  • 阅读:204

【报Bug】vue3 + ts + nvue component 元组件 is 动态绑定 或 is给定字符串都无法渲染waterfall 直接使用waterfall 没有问题

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.7.9

手机系统: Android

手机系统版本号: Android 12

手机厂商: vivo

手机机型: IN2010

页面类型: nvue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
无法实现 渲染的是list  
<template>  
    <component :is="isWaterfall" column-count="2">  
      <cell v-for="item of 10" :key="item">  
        <view  
          style="width: 200rpx; height: 200rpx; background-color: #000"  
        ></view>  
      </cell>  
    </component>  
</template>  

无法实现 渲染的是list  
<template>  
    <component is="waterfall" column-count="2">  
      <cell v-for="item of 10" :key="item">  
        <view  
          style="width: 200rpx; height: 200rpx; background-color: #000"  
        ></view>  
      </cell>  
    </component>  
</template>  

正常  
<template>  
    <waterfall column-count="2">  
      <cell v-for="item of 10" :key="item">  
        <view  
          style="width: 200rpx; height: 200rpx; background-color: #000"  
        ></view>  
      </cell>  
    </waterfall>  
</template>  

<script lang="ts" setup>  
import { ref } from "vue";  
isWaterfall = ref("waterfall");  
</script>

操作步骤:

如上代码实例

预期结果:

component 元组件 动态渲染为 waterfall

实际结果:

无法动态渲染

bug描述:

// 实例demo  
// 当动态绑定 或  is="waterfall"  时如图一所示 无法实现瀑布流 。 当 component 组件 改为 waterfall 如图二 所示可以正常实现  

图一

图二

2023-04-22 17:23 负责人:无 分享
已邀请:

要回复问题请先登录注册