You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如图, 如果没有.value 则可以正确运行, 但是TS检查报错: Property 'choosedFormIdList' does not exist on type 'Ref<{ curTaskId?: number; choosedFormIdList?: (string | number)[]; }>'.ts(2339)
浏览器的 console 可以得到预期结果:
然而 如果加入 .value 则TS可以正确检查代码, 但是运行时报错:
浏览器的 console 报错如下: TypeError: Cannot set properties of undefined (setting 'choosedFormIdList')
Link to minimal reproduction
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
Vue - Official extension or vue-tsc version
v2.0.26
VSCode version
1.91.1 (Universal)
Vue version
3.4.33
TypeScript version
5.4.0
System Info
Steps to reproduce
创建允许传入回调函数作为Prop的子组件
创建调用它的父组件, 并直接在模板内传入函数实现, 在函数实现内使用Ref定义的变量
What is expected?
运行和TypeScript检查保持一致
What is actually happening?
如图, 如果没有
.value
则可以正确运行, 但是TS检查报错:Property 'choosedFormIdList' does not exist on type 'Ref<{ curTaskId?: number; choosedFormIdList?: (string | number)[]; }>'.ts(2339)
浏览器的 console 可以得到预期结果:
然而 如果加入
.value
则TS可以正确检查代码, 但是运行时报错:浏览器的 console 报错如下:
TypeError: Cannot set properties of undefined (setting 'choosedFormIdList')
Link to minimal reproduction
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: