vue3基本使用&setup script语法糖&vue3中如何实现sync修饰符功能&`defineEmits` is a compiler macro and no longer needs to
vue3使用回顾/总结 经验使你在第二次犯相同错误时及时发现。 —— 琼斯一、基本使用vue3.x组件开发のsetup和defineComponent1.1 defineComponent- 需要导入再使用。(使用ts需借助自动推导)- defineComponent 返回传递给它的对象或有一个有合成类型的构造函数。用于类型推导,简化类型定义。- 只要是vue本身API(比如setup或vue2.x的配置项),defineComponent 都可以自动推导。在编写组件中,只需维护自定义的
原创
2021-09-24 11:56:55 ·
6133 阅读 ·
0 评论