diff --git a/src/pages/application/index.tsx b/src/pages/application/index.tsx index e130e11..c09684f 100644 --- a/src/pages/application/index.tsx +++ b/src/pages/application/index.tsx @@ -1,10 +1,43 @@ import React from 'react'; +import CustomCard from '@/components/CustomCard'; +import SubApplication from './subApplication'; +import { Tabs, Typography } from '@arco-design/web-react'; +import { IconUser, IconPublic } from '@arco-design/web-react/icon'; +import style from './style/index.module.less'; + +const TabPane = Tabs.TabPane; function Application() { return ( <> -
- 所有应用 +
+ + {/*tabs工具栏*/} + + + + 我的应用 + + }> + + + + + + + 公开应用 + + }> + + + + + +
); diff --git a/src/pages/application/style/index.module.less b/src/pages/application/style/index.module.less new file mode 100644 index 0000000..204049c --- /dev/null +++ b/src/pages/application/style/index.module.less @@ -0,0 +1,2 @@ +.container { +} \ No newline at end of file diff --git a/src/pages/application/style/subApplication.module.less b/src/pages/application/style/subApplication.module.less new file mode 100644 index 0000000..f473b1c --- /dev/null +++ b/src/pages/application/style/subApplication.module.less @@ -0,0 +1,7 @@ +.SubApplicationContainer { + .cardStyle { + margin: 5px; + border: 1px solid var(--color-neutral-3); + cursor: pointer; + } +} \ No newline at end of file diff --git a/src/pages/application/subApplication.tsx b/src/pages/application/subApplication.tsx new file mode 100644 index 0000000..e399849 --- /dev/null +++ b/src/pages/application/subApplication.tsx @@ -0,0 +1,105 @@ +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; \ No newline at end of file diff --git a/src/routes/modules/ideContainer.ts b/src/routes/modules/ideContainer.ts new file mode 100644 index 0000000..2a01608 --- /dev/null +++ b/src/routes/modules/ideContainer.ts @@ -0,0 +1,8 @@ +import { IRoute } from '@/routes/types'; + +export const ideContainerMoudle: IRoute = { + name: 'menu.ideContainer', + key: 'ideContainer', + breadcrumb: false, + ignore: true +}; \ No newline at end of file