UNPKG

ttk-app-core

Version:

@ttk/recat enterprise develop framework

27 lines (22 loc) 759 B
import React from 'react' import { action as MetaAction, AppLoader } from '@ttk/meta-engine'; import config from './config' class action { constructor(option) { this.metaAction = option.metaAction this.config = config.current } onInit = ({ component, injections }) => { this.component = component this.injections = injections let option = component.props && component.props.appParams && component.props.appParams injections.reduce('init', option) } } export default function creator(option) { const metaAction = new MetaAction(option), o = new action({ ...option, metaAction }), ret = { ...metaAction, ...o } metaAction.config({ metaHandlers: ret }) return ret }