You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

useInstance.ts 290B

123456789101112
  1. import { ComponentInternalInstance, getCurrentInstance } from 'vue'
  2. export default function useInstance() {
  3. const { appContext, proxy } = getCurrentInstance() as ComponentInternalInstance;
  4. const global = appContext.config.globalProperties;
  5. return {
  6. proxy,
  7. global,
  8. appContext
  9. }
  10. }