[vuejs/vue]Reflect.deleteProperty不会更新视图

2025-10-29 446 views
5
Version

2.7.14

Reproduction link

https://cn.vuejs.org/

Steps to reproduce const form = reactive({ name: '' }) // 事件触发 Reflect.deleteProperty(form, 'name') // 删除并不会触发 const existName = computed(() => Reflect.has(form, 'name') ) What is expected?

希望能更新视图

What is actually happening?

数据已经删除,并没有更新视图。与Vue3版本还是有差距

回答

9

https://github.com/vuejs/vue/issues/12774

0

如果您有复现问题的方法,请在 vuejs/core 上提交一个 issue。