mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-16 15:01:15 +00:00
14 lines
295 B
TypeScript
14 lines
295 B
TypeScript
import adapter from '../adapter';
|
|
|
|
|
|
export default function contextFactory() {
|
|
const { createContext } = adapter.getRuntime();
|
|
|
|
let context = (window as any).__appContext;
|
|
if (!context) {
|
|
context = createContext({});
|
|
(window as any).__appContext = context;
|
|
}
|
|
return context;
|
|
}
|