Skip to content

Commit 373882a

Browse files
authored
Merge pull request #70 from 1900s88keys/rancong_branch
Rancong branch
2 parents fb7a4b3 + e3f0cd1 commit 373882a

File tree

48 files changed

+3860
-1045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3860
-1045
lines changed

Readme.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
<img height="120" src="https://raw.githubusercontent.com/anyone-yuren/multiway/master/favicon.ico">
66

77
<h1>Gbeata Admin</h1>
8-
<p>最新代码请查看 release-admin 分支</p>
9-
Gbeata Admin是一套用于快速构建后台管理系统模板
108

11-
文档地址:[https://docs.gbeata.cn/](https://docs.gbeata.cn/)
9+
Gbeata Admin是一套用于快速构建后台管理系统模板
1210

13-
组件库地址[https://component.gbeata.cn/](https://component.gbeata.cn/)
11+
文档地址[https://anyone-yuren.github.io/gbeata-admin-docs](https://anyone-yuren.github.io/gbeata-admin-docs)
1412

1513
[English](./README.md) ・ 简体中文 ・ [更新日志](./CHANGELOG.md) · [报告问题][github-issues-link] · [请求功能][github-issues-link]
1614

@@ -28,8 +26,14 @@ Gbeata Admin是一套用于快速构建后台管理系统模板
2826

2927
![][banner]
3028

29+
<h3>新增大屏面板:分支 wk-admin-dashboard</h3>
30+
31+
![][dashboard]
32+
3133
</div>
34+
<div align="center">
3235

36+
</div>
3337
<details open>
3438
<summary><kbd>目录</kbd></summary>
3539

@@ -181,6 +185,7 @@ npx @chenshuai2144/less2cssinjs less2js -i src
181185

182186
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
183187
[banner]: https://github.com/anyone-yuren/multiway/blob/master/iShot_2024-01-05_17.05.52.gif?raw=true
188+
[dashboard]: https://github.com/anyone-yuren/multiway/blob/master/iShot_2024-07-25_19.52.09.gif?raw=true
184189
[bun-link]: https://bun.sh
185190
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
186191
[codespaces-link]: https://codespaces.new/anyone-yuren/react-antd-admin-pnpm
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { FlowEditor } from 'ui';
2+
import { Node, Edge } from 'reactflow';
3+
4+
export default () => {
5+
const initialNodes: Node[] = [
6+
{
7+
id: '1',
8+
type: 'custom',
9+
position: { x: 100, y: 100 },
10+
data: { label: '开始', description: '流程开始节点', type: 'start', status: 'active' },
11+
},
12+
{
13+
id: '2',
14+
type: 'custom',
15+
position: { x: 400, y: 100 },
16+
data: { label: '处理', description: '数据处理节点', type: 'process', status: 'active' },
17+
},
18+
{
19+
id: '3',
20+
type: 'custom',
21+
position: { x: 700, y: 100 },
22+
data: { label: '结束', description: '流程结束节点', type: 'end', status: 'active' },
23+
},
24+
];
25+
26+
const initialEdges: Edge[] = [
27+
{
28+
id: 'e1-2',
29+
source: '1',
30+
target: '2',
31+
animated: true,
32+
},
33+
{
34+
id: 'e2-3',
35+
source: '2',
36+
target: '3',
37+
animated: true,
38+
},
39+
];
40+
41+
const handleSave = (nodes: Node[], edges: Edge[]) => {
42+
console.log('保存流程数据:', { nodes, edges });
43+
};
44+
45+
return (
46+
<>
47+
<FlowEditor initialNodes={initialNodes} initialEdges={initialEdges} onSave={handleSave} />
48+
</>
49+
);
50+
};
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
import { Loading } from 'ui';
2+
import { Center } from 'react-layout-kit';
3+
import React from 'react';
4+
import { Button, Space, Switch, Card, Radio, ColorPicker, Input } from 'antd';
5+
6+
export default () => {
7+
const [loading, setLoading] = React.useState(true);
8+
const [fullscreen, setFullscreen] = React.useState(false);
9+
const [size, setSize] = React.useState<'small' | 'default' | 'large'>('default');
10+
const [color, setColor] = React.useState('#1890ff');
11+
const [tip, setTip] = React.useState('加载中...');
12+
13+
return (
14+
<Space direction="vertical" size="large" style={{ width: '100%' }}>
15+
{/* API 属性控制面板 */}
16+
<Card title="API 属性配置" style={{ marginBottom: '16px' }}>
17+
<Space direction="vertical" size="middle" style={{ width: '100%' }}>
18+
{/* loading 属性 */}
19+
<div>
20+
<Space>
21+
<Switch checked={loading} onChange={(e) => setLoading(e)} />
22+
<strong>loading:</strong> <span>{loading ? 'true' : 'false'}</span>
23+
<span style={{ color: '#999' }}>// 加载状态 | boolean | 默认值: true</span>
24+
</Space>
25+
</div>
26+
27+
{/* fullscreen 属性 */}
28+
<div>
29+
<Space>
30+
<Switch checked={fullscreen} onChange={(e) => setFullscreen(e)} />
31+
<strong>fullscreen:</strong> <span>{fullscreen ? 'true' : 'false'}</span>
32+
<span style={{ color: '#999' }}>// 是否全屏遮罩 | boolean | 默认值: false</span>
33+
</Space>
34+
</div>
35+
36+
{/* size 属性 */}
37+
<div>
38+
<Space>
39+
<strong>size:</strong>
40+
<Radio.Group value={size} onChange={(e) => setSize(e.target.value)}>
41+
<Radio.Button value="small">small</Radio.Button>
42+
<Radio.Button value="default">default</Radio.Button>
43+
<Radio.Button value="large">large</Radio.Button>
44+
</Radio.Group>
45+
<span style={{ color: '#999' }}>// 加载动画大小 | 'small' | 'default' | 'large' | 默认值: 'default'</span>
46+
</Space>
47+
</div>
48+
49+
{/* color 属性 */}
50+
<div>
51+
<Space>
52+
<strong>color:</strong>
53+
<ColorPicker value={color} onChange={(value) => setColor(value.toHexString())} />
54+
<span>{color}</span>
55+
<span style={{ color: '#999' }}>// 加载动画颜色 | string | 默认值: '#1890ff'</span>
56+
</Space>
57+
</div>
58+
59+
{/* tip 属性 */}
60+
<div>
61+
<Space>
62+
<strong>tip:</strong>
63+
<Input value={tip} onChange={(e) => setTip(e.target.value)} style={{ width: 200 }} />
64+
<span style={{ color: '#999' }}>// 加载提示文字 | string | 默认值: '加载中...'</span>
65+
</Space>
66+
</div>
67+
</Space>
68+
</Card>
69+
70+
{/* Loading 组件演示 */}
71+
<Card title="Loading 组件演示">
72+
<Center style={{ height: '30vh', border: '1px dashed #ccc', borderRadius: '8px' }}>
73+
<Loading
74+
loading={loading}
75+
fullscreen={fullscreen}
76+
tip={tip}
77+
size={size}
78+
color={color}
79+
>
80+
<div style={{ padding: '20px', background: '#f0f2f5', borderRadius: '8px' }}>
81+
<h3>内容区域</h3>
82+
<p>当 loading 为 false 时,这里会显示实际内容</p>
83+
<p>当前时间: {new Date().toLocaleString()}</p>
84+
</div>
85+
</Loading>
86+
</Center>
87+
</Card>
88+
89+
{/* 快捷操作按钮 */}
90+
<Card title="快捷操作">
91+
<Space wrap>
92+
<Button type="primary" onClick={() => setLoading(!loading)}>
93+
切换 loading 状态
94+
</Button>
95+
<Button onClick={() => setFullscreen(!fullscreen)}>
96+
切换全屏模式
97+
</Button>
98+
<Button onClick={() => setSize('small')}>
99+
小尺寸
100+
</Button>
101+
<Button onClick={() => setSize('default')}>
102+
默认尺寸
103+
</Button>
104+
<Button onClick={() => setSize('large')}>
105+
大尺寸
106+
</Button>
107+
<Button onClick={() => setColor('#1890ff')}>
108+
蓝色
109+
</Button>
110+
<Button onClick={() => setColor('#52c41a')}>
111+
绿色
112+
</Button>
113+
<Button onClick={() => setColor('#ff4d4f')}>
114+
红色
115+
</Button>
116+
</Space>
117+
</Card>
118+
119+
{/* API 说明 */}
120+
<Card title="API 属性说明">
121+
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
122+
<thead>
123+
<tr style={{ borderBottom: '2px solid #f0f0f0' }}>
124+
<th style={{ padding: '12px', textAlign: 'left', background: '#fafafa' }}>属性名</th>
125+
<th style={{ padding: '12px', textAlign: 'left', background: '#fafafa' }}>描述</th>
126+
<th style={{ padding: '12px', textAlign: 'left', background: '#fafafa' }}>类型</th>
127+
<th style={{ padding: '12px', textAlign: 'left', background: '#fafafa' }}>默认值</th>
128+
</tr>
129+
</thead>
130+
<tbody>
131+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
132+
<td style={{ padding: '12px' }}><code>loading</code></td>
133+
<td style={{ padding: '12px' }}>加载状态</td>
134+
<td style={{ padding: '12px' }}><code>boolean</code></td>
135+
<td style={{ padding: '12px' }}><code>true</code></td>
136+
</tr>
137+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
138+
<td style={{ padding: '12px' }}><code>tip</code></td>
139+
<td style={{ padding: '12px' }}>加载提示文字</td>
140+
<td style={{ padding: '12px' }}><code>string</code></td>
141+
<td style={{ padding: '12px' }}><code>'加载中...'</code></td>
142+
</tr>
143+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
144+
<td style={{ padding: '12px' }}><code>size</code></td>
145+
<td style={{ padding: '12px' }}>加载动画大小</td>
146+
<td style={{ padding: '12px' }}><code>'small' | 'default' | 'large'</code></td>
147+
<td style={{ padding: '12px' }}><code>'default'</code></td>
148+
</tr>
149+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
150+
<td style={{ padding: '12px' }}><code>color</code></td>
151+
<td style={{ padding: '12px' }}>加载动画颜色</td>
152+
<td style={{ padding: '12px' }}><code>string</code></td>
153+
<td style={{ padding: '12px' }}><code>'#1890ff'</code></td>
154+
</tr>
155+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
156+
<td style={{ padding: '12px' }}><code>fullscreen</code></td>
157+
<td style={{ padding: '12px' }}>是否全屏遮罩</td>
158+
<td style={{ padding: '12px' }}><code>boolean</code></td>
159+
<td style={{ padding: '12px' }}><code>false</code></td>
160+
</tr>
161+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
162+
<td style={{ padding: '12px' }}><code>className</code></td>
163+
<td style={{ padding: '12px' }}>自定义类名</td>
164+
<td style={{ padding: '12px' }}><code>string</code></td>
165+
<td style={{ padding: '12px' }}><code>-</code></td>
166+
</tr>
167+
<tr style={{ borderBottom: '1px solid #f0f0f0' }}>
168+
<td style={{ padding: '12px' }}><code>style</code></td>
169+
<td style={{ padding: '12px' }}>自定义样式</td>
170+
<td style={{ padding: '12px' }}><code>React.CSSProperties</code></td>
171+
<td style={{ padding: '12px' }}><code>-</code></td>
172+
</tr>
173+
<tr>
174+
<td style={{ padding: '12px' }}><code>children</code></td>
175+
<td style={{ padding: '12px' }}>子元素内容</td>
176+
<td style={{ padding: '12px' }}><code>React.ReactNode</code></td>
177+
<td style={{ padding: '12px' }}><code>-</code></td>
178+
</tr>
179+
</tbody>
180+
</table>
181+
</Card>
182+
</Space>
183+
);
184+
};
185+

0 commit comments

Comments
 (0)