Vue3 reactive对象使用const为何无法修改?-灵析社区

codbad

可以修改, 不知道你所谓不能修改是什么意思: const numberValidateForm = reactive({ name: "sd fa sdf", }); numberValidateForm.name = numberValidateForm.name.replace(/\s+ /g, ""); console.log(numberValidateForm.name, 'eq'); ![image.png](https://wmlx-new-image.oss-cn-shanghai.aliyuncs.com/images/20241102/d36d13141c5b19213ceb976e48847fe1.png)

阅读量:1

点赞量:0

问AI