SummaryContext.js 310 B

12345678
  1. import { inject, provide } from 'vue';
  2. export var SummaryContextKey = Symbol('SummaryContextProps');
  3. export var useProvideSummary = function useProvideSummary(props) {
  4. provide(SummaryContextKey, props);
  5. };
  6. export var useInjectSummary = function useInjectSummary() {
  7. return inject(SummaryContextKey, {});
  8. };