Showing
2 changed files
with
12 additions
and
3 deletions
| ... | ... | @@ -44,7 +44,7 @@ export const getParentNodes = ( |
| 44 | 44 | ) => { |
| 45 | 45 | if (!node || !treeNodes) return []; |
| 46 | 46 | if (node.previousId) { |
| 47 | - parentNode.push(allNodes[node.previousId]); | |
| 47 | + parentNode.unshift(allNodes[node.previousId]); | |
| 48 | 48 | getParentNodes(allNodes[node.previousId], treeNodes, parentNode, allNodes); |
| 49 | 49 | } |
| 50 | 50 | |
| ... | ... | @@ -81,7 +81,7 @@ const icon = (icon: any) => { |
| 81 | 81 | return <QxBaseIcon type={icon.props.type} />; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - return <img src={icon} />; | |
| 84 | + return <img className={/\.svg$/.test(icon) ? 'is-svg' : ''} src={icon} />; | |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | 87 | export const useNodeFieldDisplay = ({ |
| ... | ... | @@ -322,7 +322,7 @@ export const useNodeFieldDisplay = ({ |
| 322 | 322 | Object.assign(fields, { |
| 323 | 323 | name: fields.title, |
| 324 | 324 | code: |
| 325 | - parent && ['ORG', 'FORM', 'USER'].includes(parent.type) | |
| 325 | + parent && ['ORG', 'FORM', 'USER'].includes(parent.type) // 表单字段需要拼接父级 code | |
| 326 | 326 | ? `${parent.code}.${fields.id}` |
| 327 | 327 | : `${nodeId}|${fields.id}`, |
| 328 | 328 | extract: { |
| ... | ... | @@ -424,6 +424,7 @@ export const useNodeFieldDisplay = ({ |
| 424 | 424 | newNodes = getEffectiveNodes(cloneDeep(newNodes)); |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | + console.log('newNodes', newNodes); | |
| 427 | 428 | setOptionalNodes(newNodes); |
| 428 | 429 | resultFieldMap.current = getResultFieldMap(newNodes); |
| 429 | 430 | resolveFieldResultMap.current?.(resultFieldMap.current); | ... | ... |