#
luxiaotao1123
2024-03-28 fddf567bffc2907c8f19586c6b6823cff4278d9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React, { useState, useRef, useEffect } from 'react';
import { Card, Form, Button } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { createStyles } from 'antd-style';
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShelfThree from './shelfThree'
 
const useStyles = createStyles(({ token, css }) => {
    return {
        threeContainer: {
            zIndex: 99,
            width: '500px',
            height: '600px',
        }
    }
})
 
let shelfThree;
 
const ShelfView = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
 
    console.log(props.data);
 
    const refContainer = useRef();
 
    useEffect(() => {
        shelfThree = new ShelfThree(refContainer);
        shelfThree.startup();
    }, []);
 
    return (
        <>
            <div className={styles.threeContainer} ref={refContainer}></div>
        </>
    )
}
 
export default ShelfView;