Commit e61f79cf authored by 田翔's avatar 田翔

fix: 去除loading

parent caa773cb
{
"name": "panda-xform",
"version": "4.4.1",
"description": "4.4.1 提供字段对应的形态方法",
"version": "4.4.3",
"description": "4.4.3 更换地图版本暂时去除loading",
"keywords": [
"panda-xform"
],
......@@ -54,7 +54,7 @@
"@babel/plugin-transform-modules-amd": "^7.14.5",
"@umijs/fabric": "^2.0.7",
"@wisdom-map/amap": "1.1.0-beta.45",
"@wisdom-map/arcgismap": "1.4.0-158",
"@wisdom-map/arcgismap": "1.4.0-124",
"@wisdom-map/basemap": "1.1.0-24",
"babel-loader": "^8.2.2",
"babel-plugin-import": "^1.13.3",
......@@ -131,4 +131,4 @@
"publishConfig": {
"registry": "https://g.civnet.cn:4873"
}
}
\ No newline at end of file
}
......@@ -11,7 +11,7 @@ import widgets from '../widgets'
import { isObject } from '../../utils'
import { getWatch } from './watch'
import styles from '../../main.less'
import PrintXform from './components/PrintXform'
// import PrintXform from './components/PrintXform'
const XRender = (props, ref) => {
......@@ -30,7 +30,6 @@ const XRender = (props, ref) => {
const prefixCls = getPrefixCls('pandaXform')
const pandaXform = getPrefixCls()
const [startTime, setStartTime] = useState(new Date().getTime())
const [loading, setLoading] = useState(true)
const form = useForm()
const schemaForm = useMemo(() => {
......@@ -108,30 +107,28 @@ const XRender = (props, ref) => {
//初始化时存储外部传的额外数据
const onMount = () => {
setTimeout(() => {
setLoading(false)
}, 500)
// setTimeout(() => {
// setLoading(false)
// }, 500)
// form.setValueByPath('extraData', extraData || { codes: { '事件编号': '12312' } })
}
return (
<div className={styles.pandaXform}>
<Spin spinning={loading} tip="Loading...">
<FormRender
style={{ display: print ? 'none' : 'block' }}
configProvider={{ prefixCls: pandaXform }}
removeHiddenData={false}
form={form}
schema={schemaForm}
mapping={{
object: 'Header',
}}
widgets={widgets}
watch={watch}
onMount={onMount}
/>
{print ? <PrintXform schemaForm={schemaForm} form={form} /> : null}
</Spin>
<FormRender
// style={{ display: print ? 'none' : 'block' }}
configProvider={{ prefixCls: pandaXform }}
removeHiddenData={false}
form={form}
schema={schemaForm}
mapping={{
object: 'Header',
}}
widgets={widgets}
watch={watch}
onMount={onMount}
/>
{/* {print ? <PrintXform schemaForm={schemaForm} form={form} /> : null} */}
</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