干燥机配套车间生产管理系统/云平台前端
bsw215583320
2023-08-07 f99258bbb1cc15dc117f7ddd3b1af9d50cb7b2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { InjectionKey } from 'vue';
import { createContext, useContext } from '/@/hooks/core/useContext';
 
export interface ModalContextProps {
  redoModalHeight: () => void;
}
 
const key: InjectionKey<ModalContextProps> = Symbol();
 
export function createModalContext(context: ModalContextProps) {
  return createContext<ModalContextProps>(context, key);
}
 
export function useModalContext() {
  return useContext<ModalContextProps>(key);
}