provide.ts 780 B

1234567891011121314151617
  1. import type { AnyFn } from '@vueuse/core'
  2. /** 登录 */
  3. export const onLoginKey = Symbol('onLoginKey') as InjectionKey<AnyFn>
  4. /** 更新路由组件数据 */
  5. export const updateParentKey = Symbol('updateParentKey') as InjectionKey<AnyFn>
  6. /** 路由组件name */
  7. export const routerKey = Symbol('routerKey') as InjectionKey<Ref<string>>
  8. /** 路由组件接口是否报错 */
  9. export const dataHasErrorKey = Symbol('dataHasErrorKey') as InjectionKey<ComputedRef<boolean>>
  10. /** 路由组件接口是否请求完成 */
  11. export const dataIsReadyKey = Symbol('dataIsReadyKey') as InjectionKey<ComputedRef<number>>
  12. export const showDialogKey = Symbol('showDialogKey') as InjectionKey<ComputedRef<boolean>>
  13. export const toggleDialogKey = Symbol('toggleDialogKey') as InjectionKey<AnyFn>