Commit 7f023aaa authored by 田翔's avatar 田翔

fix: BUG修复

parent 1d3f4046
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.1.6", "version": "4.1.7",
"description": "4.1.6 增加显示打印组件", "description": "4.1.7 BUG修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import styles from './index.less' import styles from './index.less'
import { isObject } from '../../../../utils'
const PrintXform = (props) => { const PrintXform = (props) => {
......
...@@ -114,14 +114,11 @@ const XRender = (props, ref) => { ...@@ -114,14 +114,11 @@ const XRender = (props, ref) => {
// form.setValueByPath('extraData', extraData || { codes: { '事件编号': '12312' } }) // form.setValueByPath('extraData', extraData || { codes: { '事件编号': '12312' } })
} }
if (print) {
return <PrintXform schemaForm={schemaForm} form={form} />
}
return ( return (
<div className={styles.pandaXform}> <div className={styles.pandaXform}>
<Spin spinning={loading} tip="Loading..."> <Spin spinning={loading} tip="Loading...">
<FormRender <FormRender
style={{ display: print ? 'none' : 'block' }}
configProvider={{ prefixCls: pandaXform }} configProvider={{ prefixCls: pandaXform }}
removeHiddenData={false} removeHiddenData={false}
form={form} form={form}
...@@ -134,6 +131,7 @@ const XRender = (props, ref) => { ...@@ -134,6 +131,7 @@ const XRender = (props, ref) => {
onMount={onMount} onMount={onMount}
/> />
</Spin> </Spin>
{print ? <PrintXform schemaForm={schemaForm} form={form} /> : null}
</div> </div>
) )
......
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