Commit 543720aa authored by XieZhiXiong's avatar XieZhiXiong

chore: 搬运能力中心代码

parent f758dc69
......@@ -4,6 +4,11 @@ export const useLinkageUtils = () => {
const { setFieldState } = createFormActions()
const linkage = (key, defaultValue?) => (path, value?) =>
setFieldState(path, state => {
const componentProps = state.props['x-component-props'] || {}
// 对象浅合并
if (key === 'props.x-component-props') {
value = Object.assign({}, componentProps, value)
}
FormPath.setIn(state, key, value !== undefined ? value : defaultValue)
})
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment