소스 검색

feat(cientos): getting app from getCurrentInstance 🤩

Alvaro 2 년 전
부모
커밋
f899977f25
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      packages/cientos/src/core/useCientos.ts

+ 3 - 1
packages/cientos/src/core/useCientos.ts

@@ -1,7 +1,9 @@
 import { useCatalogue } from '@tresjs/core'
 import { useCatalogue } from '@tresjs/core'
+import { getCurrentInstance } from 'vue'
 
 
 export function useCientos() {
 export function useCientos() {
-  const { catalogue, extend } = useCatalogue(window.__TRES__.app)
+  const { appContext } = getCurrentInstance()
+  const { catalogue, extend } = useCatalogue(appContext.app)
 
 
   return {
   return {
     catalogue,
     catalogue,