Explorar el Código

feat(cientos): getting app from getCurrentInstance 🤩

Alvaro hace 2 años
padre
commit
f899977f25
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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,