import React, { useState } from 'react'; import style from './style/SubApplication.module.less'; import { Input, Grid, Card, Result, Pagination } from '@arco-design/web-react'; import { IconPlus, IconApps } from '@arco-design/web-react/icon'; const InputSearch = Input.Search; const Row = Grid.Row; const Col = Grid.Col; interface SubApplicationProps { dataType: 'my' | 'public', showAdd?: boolean, } const SubApplication: 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) => { console.log('打开应用', index); const ideUrl = '/ideContainer'; window.open(ideUrl, '_blank'); }; return ( <>
{/*搜索*/} {/*卡片模式数据渲染*/} {/*新建应用按钮*/} {showAdd && ( } > )} {/*遍历生成卡片*/} {Array.from({ length: count }).map((item, index) => ( openEngineHandle(index)}> } > ))}
); }; export default SubApplication;