UNPKG

@antdp/antdp-ui

Version:

基于antd封装的组件

24 lines 604 B
import _extends from "@babel/runtime/helpers/extends"; import { HOOK_MARK } from 'rc-field-form/lib/FieldContext'; // 根据 Form.useForm() 返回值 [from] 进行获取子项中更新值的方法 export var getChildItemFun = form => { var childFun = {}; if (form) { var { getInternalHooks } = form; childFun = getInternalHooks(HOOK_MARK); } var updateValue = (namePath, value) => { if (childFun.dispatch) { childFun.dispatch({ type: 'updateValue', namePath, value }); } }; return _extends({}, childFun, { updateValue }); };