import React, { useState } from 'react'; import style from './style/engineering.module.less'; import { Input, Grid, Card, Result, Pagination } from '@arco-design/web-react'; import { IconPlus, IconApps } from '@arco-design/web-react/icon'; import { openWindow, OpenWindowOptions } from '@/utils/common'; const InputSearch = Input.Search; const Row = Grid.Row; const Col = Grid.Col; interface EngineeringProps { dataType: 'my' | 'public', showAdd?: boolean, } const Engineering: React.FC = ({ dataType, showAdd = true }) => { const [searchValue, setSearchValue] = useState(''); const [count, setCount] = useState(12); const onSearchHandle = (value: string) => { if (!value) return; console.log('状态值:', searchValue); }; const handleChange = (value: string) => { setSearchValue(value); }; const openEngineHandle = (index: number) => { const url = `/ideContainer`; const params: OpenWindowOptions = { target: '_blank', menu: false, identity: 'scene' }; openWindow(url, params); }; return ( <>
{/*搜索*/} {/*卡片模式数据渲染*/} {/*新建工程按钮*/} {showAdd && ( } > )} {/*遍历生成卡片*/} {Array.from({ length: count }).map((item, index) => ( openEngineHandle(index)}> } > ))}
); }; export default Engineering;