#
luxiaotao1123
2024-03-28 2ade0a881a00bf7ebc6cd6067f52d3a268508111
zy-asrs-flow/src/pages/map/drawer/shelf/view.jsx
@@ -23,20 +23,30 @@
    const intl = useIntl();
    const { styles } = useStyles();
    const refContainer = useRef();
    const [loading, setLoading] = React.useState(true);
    const [loading, setLoading] = React.useState(false);
    const startThree = () => {
        shelfThree = new ShelfThree(refContainer.current);
        shelfThree.startup();
    }
    const endThree = () => {
        if (shelfThree) {
            shelfThree.destroy();
            shelfThree = null;
        }
    }
    useEffect(() => {
        console.log(props);
        setLoading(true);
        endThree();
        setTimeout(() => {
            setLoading(false);
            shelfThree = new ShelfThree(refContainer.current);
            shelfThree.startup();
        }, 1000)
            startThree();
        }, 300)
        return () => {
            shelfThree?.destroy();
        }
    }, [props]);
        return endThree;
    }, [props.data.uuid]);
    return (
        <>