diff --git a/src/pages/orchestration/appCompComponent/index.tsx b/src/pages/orchestration/appCompComponent/index.tsx new file mode 100644 index 0000000..e5e0400 --- /dev/null +++ b/src/pages/orchestration/appCompComponent/index.tsx @@ -0,0 +1,26 @@ +import React, { useEffect, useState } from 'react'; +import { useSelector } from 'react-redux'; +import { getProjectComp } from '@/api/scene'; + +const AppCompComponent = () => { + const [compList, setCompList] = useState([]); + const { info } = useSelector((state: any) => state.ideContainer); + + const fetchData = async () => { + const res: any = await getProjectComp(info.id); + console.log('res:', res); + if (res.code === 200) setCompList(res.data); + }; + + useEffect(() => { + fetchData(); + }, []); + + return ( +
+ 组件 +
+ ); +}; + +export default AppCompComponent; \ No newline at end of file