File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ const foo = inject<string>('foo') // string | undefined
164
164
` getCurrentInstance ` enables access to an internal component instance useful for advanced usages or for library creators .
165
165
166
166
` ` ` ts
167
- import { getCurrentIntance } from 'vue'
167
+ import { getCurrentInstance } from 'vue'
168
168
169
169
const MyComponent = {
170
170
setup() {
171
- const internalIntance = getCurrentInstance()
171
+ const internalInstance = getCurrentInstance()
172
172
173
173
internalInstance.appContext.config.globalProperties // access to globalProperties
174
174
}
@@ -182,15 +182,15 @@ const MyComponent = {
182
182
` ` ` ts
183
183
const MyComponent = {
184
184
setup() {
185
- const internalIntance = getCurrentInstance() // works
185
+ const internalInstance = getCurrentInstance() // works
186
186
187
187
const id = useComponentId() // works
188
188
189
189
const handleClick = () => {
190
190
getCurrentInstance() // doesn't work
191
191
useComponentId() // doesn't work
192
192
193
- internalIntance // works
193
+ internalInstance // works
194
194
}
195
195
196
196
onMounted(() => {
You can’t perform that action at this time.
0 commit comments