Dasfernweh
Dasfernweh
  • 发布:2021-07-20 17:39
  • 更新:2021-08-30 14:35
  • 阅读:728

【报Bug】字节小程序下使用 .sync 更新父子组件间的值失效

分类:uni-app

产品分类: uniapp/小程序/字节跳动

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.1.22

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

基础库版本号: 2.13.0.3

项目创建方式: HBuilderX

示例代码:

子组件:

<template>  
  <view @click="updateTap">testettsts</view>  
</template>  
<script>  
export default {  
  props: ['shouldShow'],  
  data() {  
    return {};  
  },  

  methods: {  
    updateTap() {  
      console.log(1111);  
      this.$emit('update:shouldShow', !this.shouldShow);  
    },  
  },  
};  
</script>

父组件:

<template>  
<test-com :should-show.sync="shouldShowSpec"></test-com>  
</template>  
<script>  
export default {  
  data() {  
    return {  
      shouldShowSpec: false,  
    };  
  },  
};  
</script>

操作步骤:

见代码实例

预期结果:

能正常更新数据

实际结果:

无法更新数据

bug描述:

子组件通过 .sync 修改父组件的值,目前微信小程序可以,但是字节不成功,能成功触发 emit,但是更新失败。
该功能之前是好用的,7.8~7.11号经测试,模拟器和真机均正常。大概7.12号左右开始模拟器不可用,7.20号在真机抖音上不可用。

2021-07-20 17:39 负责人:无 分享
已邀请:
DCloud_UNI_LXH

DCloud_UNI_LXH

  1. 回滚HBuilder X版本是否正常?
  2. 正常时和有问题时,字节开发者工具的版本和基础库版本是否一致?
DCloud_UNI_LXH

DCloud_UNI_LXH

bug已确认,已加分,预计下版修复


https://github.com/dcloudio/uni-app/issues/2774

DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX alpha 3.2.5+ 已修复

该问题目前已经被锁定, 无法添加新回复