feat(appCompComponent): 增加所有工程下的子类-组件页
parent
5f97a93c68
commit
7a4d82c5f8
@ -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 (
|
||||||
|
<div>
|
||||||
|
组件
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AppCompComponent;
|
||||||
Loading…
Reference in New Issue