2***@qq.com
2***@qq.com
  • 发布:2025-01-20 11:27
  • 更新:2025-01-20 11:58
  • 阅读:55

【报Bug】最新版本中 微信小程序原生 hidden 属性失效

分类:uni-app

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

PC开发环境操作系统: Windows

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

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

基础库版本号: 3.7.5

项目创建方式: CLI

CLI版本号: 3.0.0-4040520250104002

示例代码:
<template>  
  <view class="content">  
    <image class="logo" src="/static/logo.png" />  
    <view :hidden="hidden" class="text-area">  
      <text class="title">{{ title }}</text>  
    </view>  
    <movable-view :hidden="hidden">  
      <text>movable-view</text>  
    </movable-view>  
    <view v-show="!hidden">v-show</view>  
    <view>hidden: {{ hidden }}</view>  
  </view>  
</template>  

<script setup lang="ts">  
import { ref } from 'vue';  
const title = ref('Hello');  

const hidden = ref(true);  
</script>  

<style>  
.content {  
  display: flex;  
  flex-direction: column;  
  align-items: center;  
  justify-content: center;  
}  

.logo {  
  height: 200rpx;  
  width: 200rpx;  
  margin-top: 200rpx;  
  margin-left: auto;  
  margin-right: auto;  
  margin-bottom: 50rpx;  
}  

.text-area {  
  display: flex;  
  justify-content: center;  
}  

.title {  
  font-size: 36rpx;  
  color: #8f8f94;  
}  
</style>

操作步骤:

直接使用官方cli 升级最新版本

预期结果:

hidden 可以隐藏元素

实际结果:

没有隐藏元素,无效

bug描述:

在 标签中 使用 hidden 无效,3.0.0-4030620241128001 版本有效。 测试几个版本 '3.0.0-4040520250104001',
'3.0.0-4040520250104002' 无效。

2025-01-20 11:27 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

不是用变量 直接 写 hidden 有效

DCloud_UNI_yuhe

DCloud_UNI_yuhe

感谢反馈,已复现这个问题,等我看一下问题出在哪里

要回复问题请先登录注册