Commit e61f79cf authored by 田翔's avatar 田翔

fix: 去除loading

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