logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

VUE中Property ‘xxxx’ does not exist on type ‘CombinedVueInstance

报错内容Property ‘xxxx’ does not exist on type 'CombinedVueInstance<{ readyOnly: unknown; businessPrice: unknown; travelStaffInfo: any; } & Record<never, any> & Vue, object, object, objec

#vscode
vue3 中使用 props, emits 并指定其类型与默认值

本文主要描述 vue3 中 defineProps 与 defineEmits 分别在 JS 环境和 TS 环境中的使用方法。经过上述代码示例,可能觉得 ts 的写法似乎更加麻烦了,不如 js 来的快。但是,我个人认为使用 ts 开发不仅仅是提示友好,而且能有效避开很多的坑。可谓:"未雨绸缪"胜过“亡羊补牢”的好。最后,需要这篇文有帮到你。如有谬误,不吝赐教。

#javascript#前端#开发语言
到底了