diff --git a/src/pages/scene/engineering.tsx b/src/pages/scene/engineering.tsx new file mode 100644 index 0000000..d5e76b6 --- /dev/null +++ b/src/pages/scene/engineering.tsx @@ -0,0 +1,98 @@ +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'; + +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); + }; + return ( + <> +
+ {/*搜索*/} + + + + + + {/*卡片模式数据渲染*/} + + + {/*新建工程按钮*/} + {showAdd && ( + + } + > + + )} + + {/*遍历生成4个卡片*/} + {Array.from({ length: count }).map((item, index) => ( + + + } + > + + + ))} + + + + + + +
+ + ); +}; + +export default Engineering; \ No newline at end of file diff --git a/src/pages/scene/index.tsx b/src/pages/scene/index.tsx index 0da8716..4419f17 100644 --- a/src/pages/scene/index.tsx +++ b/src/pages/scene/index.tsx @@ -1,10 +1,43 @@ import React from 'react'; +import CustomCard from '@/components/CustomCard'; +import Engineering from './engineering'; +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 Scene() { return ( <> -
- 所有应用 +
+ + {/*tabs工具栏*/} + + + + 我的工程 + + }> + + + + + + + 公开工程 + + }> + + + + + +
); diff --git a/src/pages/scene/style/engineering.module.less b/src/pages/scene/style/engineering.module.less new file mode 100644 index 0000000..49b6bd2 --- /dev/null +++ b/src/pages/scene/style/engineering.module.less @@ -0,0 +1,6 @@ +.engineeringContainer { + .cardStyle { + margin: 5px; + border: 1px solid var(--color-neutral-3); + } +} \ No newline at end of file diff --git a/src/pages/scene/style/index.module.less b/src/pages/scene/style/index.module.less new file mode 100644 index 0000000..204049c --- /dev/null +++ b/src/pages/scene/style/index.module.less @@ -0,0 +1,2 @@ +.container { +} \ No newline at end of file