引入 getCurrentInstance方法 获取当前组件的实例
import {getCurrentInstance} from 'vue'
使用
const instance = getCurrentInstance()
console.log(instance,'当前组件的实例')
引入 getCurrentInstance方法 获取当前组件的实例
import {getCurrentInstance} from 'vue'
使用
const instance = getCurrentInstance()
console.log(instance,'当前组件的实例')