wuyue.xht 4546dc07ed feat: 重构renderer
fix: 导出 compFactory
2021-01-29 14:04:06 +08:00

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;
}