父子组件传值,页面更新后,未触发子组件 $attrs 更新,更新值流转到了 $props 上 #5016
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
Version
3.2.22
Reproduction link
sfc.vuejs.org/
Steps to reproduce
父子组件传值,子组件声明 attr 并且初始值是 underfined
此时,更新 attr, 子组件 $attrs 并未收到更新,发现此时的更新进入 $props 中(并未在子组件中,声明改 attr 为 prop 属性)
排查发现:
updateProps 会在 _hmrId 为 underfined 时,把 attribute 设置到 $porps 中
What is expected?
期望 $attrs 更新,而不是 $porps 更新
What is actually happening?
$attrs 未更新,prop 进入 $porps 且转换为驼峰规则
The text was updated successfully, but these errors were encountered: