组合式setup语法糖法,怎么获取context #9395
Answered
by
Alfred-Skyblue
Niefee
asked this question in
Help/Questions
Replies: 1 comment
-
<script lang="ts" setup>
import { getCurrentInstance } from 'vue'
const vm = getCurrentInstance()
console.log(vm)
console.log(vm?.proxy.$attrs)
console.log(vm?.proxy.$slots)
console.log(vm?.proxy.$emit)
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
edison1105
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
以前写法好像无法获取context,有没办法获取context
Beta Was this translation helpful? Give feedback.
All reactions