#
luxiaotao1123
2024-03-28 4f4567087895bbb0d7c5b36a54eab2c1bb6fe567
#
1个文件已修改
27 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/drawer/shelf/view.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shelf/view.jsx
@@ -1,6 +1,7 @@
import React, { useState, useRef, useEffect } from 'react';
import { Card, Form, Button } from 'antd';
import { Spin, Form, Button } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { LoadingOutlined } from '@ant-design/icons';
import { createStyles } from 'antd-style';
import * as Utils from '../../utils'
import Http from '@/utils/http';
@@ -12,7 +13,7 @@
            zIndex: 99,
            width: '500px',
            height: '600px',
        }
        },
    }
})
@@ -21,23 +22,31 @@
const ShelfView = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    // console.log(props.data);
    const refContainer = useRef();
    const [loading, setLoading] = React.useState(true);
    useEffect(() => {
        shelfThree = new ShelfThree(refContainer.current);
        shelfThree.startup();
        console.log(props);
        setTimeout(() => {
            setLoading(false);
            shelfThree = new ShelfThree(refContainer.current);
            shelfThree.startup();
        }, 1000)
        return () => {
            shelfThree?.destroy();
        }
    }, []);
    }, [props]);
    return (
        <>
            <div className={styles.threeContainer} ref={refContainer}></div>
            <Spin
                spinning={loading}
                indicator={<LoadingOutlined spin />}
                size={'large'}
            >
                <div ref={refContainer} className={styles.threeContainer}></div>
            </Spin>
        </>
    )
}