首先大家知道我们可以通过 getCurrentInstance这个函数来获取当前组件的实例对象,也就是当前vue这个实例对象
在Vue2中,我们是可以通过this来获取当前组件实例;
但是在Vue3中,在setup中无法通过this获取组件实例的。所以在Vue3中,我们可以通过getCurrentInstance()来获取当前组件实例 。
let {
proxy } = getCurrentInstance();
在setup中分别打印prox,getCurrentInstance,getCurrentInstance()3个值,
getCurrentInstance是一个function方法,getCurrentInstance()是一个对象,pro