组合式API(包括script setup)
child::
getCurrentInstance
指向原始笔记的链接
- getCurrentInstance获取当前组件实例
- 只能在组件Vue setup方法中执行
Vue 选项式API
选项式API获取当前组件实例
通过this对象
指向原始笔记的链接
child::
getCurrentInstance
指向原始笔记的链接
- getCurrentInstance获取当前组件实例
- 只能在组件Vue setup方法中执行
选项式API获取当前组件实例
通过this对象
指向原始笔记的链接