AvatarContext.js 280 B

12345678
  1. import { inject, provide } from 'vue';
  2. const AvatarContextKey = Symbol('AvatarContextKey');
  3. export const useAvatarInjectContext = () => {
  4. return inject(AvatarContextKey, {});
  5. };
  6. export const useAvatarProviderContext = context => {
  7. return provide(AvatarContextKey, context);
  8. };