@appthen/cli 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/main.js +47 -0
- package/dist/index.js +6185 -15001
- package/package.json +8 -4
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1197 -741
- package/tests/test-app/.appthen/space-config.json +2 -2
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +1 -1
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +0 -1060
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文件管理器
|
|
3
|
+
* 文件和目录管理
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /files
|
|
7
|
+
* @screen 1920w
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IProps {
|
|
15
|
+
folderId?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* 数据与接口请求定义
|
|
20
|
+
*/
|
|
21
|
+
class IState {
|
|
22
|
+
files?: {
|
|
23
|
+
/* @example 1 */id?: number,
|
|
24
|
+
/* @example document.pdf */name?: string,
|
|
25
|
+
/* @example 2048576 */size?: number,
|
|
26
|
+
/* @example pdf */type?: string,
|
|
27
|
+
/* @example 2024-01-15 10:30 */createTime?: string,
|
|
28
|
+
/* @example 15 */downloadCount?: number,
|
|
29
|
+
}[];
|
|
30
|
+
folders?: {
|
|
31
|
+
/* @example 1 */id?: number,
|
|
32
|
+
/* @example 文档 */name?: string,
|
|
33
|
+
/* @example 15 */fileCount?: number,
|
|
34
|
+
/* @example 52428800 */size?: number,
|
|
35
|
+
/* @example 2024-01-01 */createTime?: string,
|
|
36
|
+
}[];
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
selectedFile?: any;
|
|
39
|
+
searchKeyword?: string;
|
|
40
|
+
viewMode?: string;
|
|
41
|
+
uploadProgress?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
class Document extends React.Component<IProps, IState> {
|
|
45
|
+
state = {
|
|
46
|
+
files: [
|
|
47
|
+
{
|
|
48
|
+
id: 1,
|
|
49
|
+
name: 'document.pdf',
|
|
50
|
+
size: 2048576,
|
|
51
|
+
type: 'pdf',
|
|
52
|
+
createTime: '2024-01-15 10:30',
|
|
53
|
+
downloadCount: 15,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2,
|
|
57
|
+
name: 'image.png',
|
|
58
|
+
size: 1024000,
|
|
59
|
+
type: 'image',
|
|
60
|
+
createTime: '2024-01-14 15:20',
|
|
61
|
+
downloadCount: 23,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 3,
|
|
65
|
+
name: 'data.xlsx',
|
|
66
|
+
size: 512000,
|
|
67
|
+
type: 'excel',
|
|
68
|
+
createTime: '2024-01-13 09:00',
|
|
69
|
+
downloadCount: 8,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 4,
|
|
73
|
+
name: 'report.docx',
|
|
74
|
+
size: 1536000,
|
|
75
|
+
type: 'word',
|
|
76
|
+
createTime: '2024-01-12 16:45',
|
|
77
|
+
downloadCount: 12,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 5,
|
|
81
|
+
name: 'archive.zip',
|
|
82
|
+
size: 10485760,
|
|
83
|
+
type: 'archive',
|
|
84
|
+
createTime: '2024-01-11 11:30',
|
|
85
|
+
downloadCount: 5,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
folders: [
|
|
89
|
+
{
|
|
90
|
+
id: 1,
|
|
91
|
+
name: '文档',
|
|
92
|
+
fileCount: 15,
|
|
93
|
+
size: 52428800,
|
|
94
|
+
createTime: '2024-01-01',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 2,
|
|
98
|
+
name: '图片',
|
|
99
|
+
fileCount: 32,
|
|
100
|
+
size: 104857600,
|
|
101
|
+
createTime: '2024-01-01',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 3,
|
|
105
|
+
name: '音乐',
|
|
106
|
+
fileCount: 8,
|
|
107
|
+
size: 52428800,
|
|
108
|
+
createTime: '2024-01-05',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
loading: false,
|
|
112
|
+
selectedFile: null,
|
|
113
|
+
searchKeyword: '',
|
|
114
|
+
viewMode: 'grid',
|
|
115
|
+
uploadProgress: 0,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
handleSearch(keyword) {
|
|
119
|
+
this.setState({
|
|
120
|
+
searchKeyword: keyword,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
handleViewModeChange(mode) {
|
|
125
|
+
this.setState({
|
|
126
|
+
viewMode: mode,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
handleFileClick(file) {
|
|
131
|
+
this.setState({
|
|
132
|
+
selectedFile: file,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
handleFileDelete(fileId) {
|
|
137
|
+
this.setState({
|
|
138
|
+
files: this.state.files.filter(f => f.id !== fileId),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
handleUpload(file) {
|
|
143
|
+
this.setState({
|
|
144
|
+
uploadProgress: 0,
|
|
145
|
+
});
|
|
146
|
+
const interval = setInterval(() => {
|
|
147
|
+
const progress = this.state.uploadProgress + 10;
|
|
148
|
+
if (progress >= 100) {
|
|
149
|
+
clearInterval(interval);
|
|
150
|
+
this.setState({
|
|
151
|
+
uploadProgress: 100,
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
this.setState({
|
|
155
|
+
uploadProgress: progress,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}, 200);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
formatFileSize(bytes) {
|
|
162
|
+
if (bytes < 1024) return bytes + ' B';
|
|
163
|
+
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
164
|
+
return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
render() {
|
|
168
|
+
// 💀 死亡:变量声明 - 解构赋值
|
|
169
|
+
const {
|
|
170
|
+
files,
|
|
171
|
+
folders,
|
|
172
|
+
loading,
|
|
173
|
+
selectedFile,
|
|
174
|
+
searchKeyword,
|
|
175
|
+
viewMode,
|
|
176
|
+
uploadProgress,
|
|
177
|
+
} = this.state;
|
|
178
|
+
|
|
179
|
+
// 💀 死亡:变量声明 - 计算属性
|
|
180
|
+
// 💀 死亡:变量声明 - 计算属性
|
|
181
|
+
const totalFiles = files.length;
|
|
182
|
+
const totalSize = files.reduce((sum, file) => sum + file.size, 0);
|
|
183
|
+
const totalFolders = folders.length;
|
|
184
|
+
const avgFileSize = Math.round(totalSize / totalFiles);
|
|
185
|
+
|
|
186
|
+
// 💀 死亡:变量声明 - 过滤后的文件
|
|
187
|
+
// 💀 死亡:变量声明 - 过滤后的文件
|
|
188
|
+
const filteredFiles = files.filter(
|
|
189
|
+
file =>
|
|
190
|
+
file.name.includes(searchKeyword) || file.type.includes(searchKeyword)
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
// 💀 死亡:if 语句 - 条件渲染
|
|
194
|
+
// 💀 死亡:if 语句 - 条件渲染
|
|
195
|
+
if (loading) {
|
|
196
|
+
return <View className="p-6">加载中...</View>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 💀 死亡:变量声明 - 文件类型配置
|
|
200
|
+
// 💀 死亡:变量声明 - 文件类型配置
|
|
201
|
+
const fileTypeConfig = {
|
|
202
|
+
pdf: {
|
|
203
|
+
color: 'red',
|
|
204
|
+
icon: '📄',
|
|
205
|
+
},
|
|
206
|
+
image: {
|
|
207
|
+
color: 'green',
|
|
208
|
+
icon: '🖼️',
|
|
209
|
+
},
|
|
210
|
+
excel: {
|
|
211
|
+
color: 'green',
|
|
212
|
+
icon: '📊',
|
|
213
|
+
},
|
|
214
|
+
word: {
|
|
215
|
+
color: 'blue',
|
|
216
|
+
icon: '📝',
|
|
217
|
+
},
|
|
218
|
+
archive: {
|
|
219
|
+
color: 'orange',
|
|
220
|
+
icon: '📦',
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// 💀 死亡:变量声明 - 树形数据
|
|
225
|
+
// 💀 死亡:变量声明 - 树形数据
|
|
226
|
+
const treeData = folders.map(folder => ({
|
|
227
|
+
key: folder.id,
|
|
228
|
+
title: folder.name,
|
|
229
|
+
children: [],
|
|
230
|
+
}));
|
|
231
|
+
|
|
232
|
+
// 💀 死亡:变量声明 - 表格列配置
|
|
233
|
+
// 💀 死亡:变量声明 - 表格列配置
|
|
234
|
+
const columns = [
|
|
235
|
+
{
|
|
236
|
+
title: '文件名',
|
|
237
|
+
dataIndex: 'name',
|
|
238
|
+
key: 'name',
|
|
239
|
+
render: text => <Text className="font-medium">{text}</Text>,
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
title: '大小',
|
|
243
|
+
dataIndex: 'size',
|
|
244
|
+
key: 'size',
|
|
245
|
+
render: size => <Text>{this.formatFileSize(size)}</Text>,
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
title: '类型',
|
|
249
|
+
dataIndex: 'type',
|
|
250
|
+
key: 'type',
|
|
251
|
+
render: type => (
|
|
252
|
+
<Tag color={fileTypeConfig[type]?.color || 'gray'}>
|
|
253
|
+
{fileTypeConfig[type]?.icon || '📁'} {type}
|
|
254
|
+
</Tag>
|
|
255
|
+
),
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
title: '下载次数',
|
|
259
|
+
dataIndex: 'downloadCount',
|
|
260
|
+
key: 'downloadCount',
|
|
261
|
+
},
|
|
262
|
+
];
|
|
263
|
+
|
|
264
|
+
// 💀 死亡:变量声明 - JSX 片段函数
|
|
265
|
+
// 💀 死亡:变量声明 - JSX 片段函数
|
|
266
|
+
const fileCard = file => (
|
|
267
|
+
<Card
|
|
268
|
+
key={file.id}
|
|
269
|
+
className="hover:shadow-lg transition-shadow cursor-pointer"
|
|
270
|
+
onClick={() => this.handleFileClick(file)}
|
|
271
|
+
>
|
|
272
|
+
<View className="text-center">
|
|
273
|
+
<Text className="text-5xl mb-3 block">
|
|
274
|
+
{fileTypeConfig[file.type]?.icon || '📁'}
|
|
275
|
+
</Text>
|
|
276
|
+
<Text className="font-bold block truncate">{file.name}</Text>
|
|
277
|
+
<Text className="text-gray-500 text-sm block">
|
|
278
|
+
{this.formatFileSize(file.size)}
|
|
279
|
+
</Text>
|
|
280
|
+
</View>
|
|
281
|
+
</Card>
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
// 💀 死亡:变量声明 - 文件夹卡片
|
|
285
|
+
// 💀 死亡:变量声明 - 文件夹卡片
|
|
286
|
+
const folderCard = folder => (
|
|
287
|
+
<Card key={folder.id} className="hover:shadow-lg transition-shadow">
|
|
288
|
+
<View className="text-center">
|
|
289
|
+
<Text className="text-5xl mb-3 block">📁</Text>
|
|
290
|
+
<Text className="font-bold block">{folder.name}</Text>
|
|
291
|
+
<Text className="text-gray-500 text-sm block">
|
|
292
|
+
{folder.fileCount} 个文件
|
|
293
|
+
</Text>
|
|
294
|
+
</View>
|
|
295
|
+
</Card>
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
// 💀 死亡:变量声明 - 快捷操作
|
|
299
|
+
// 💀 死亡:变量声明 - 快捷操作
|
|
300
|
+
const quickActions = [
|
|
301
|
+
{
|
|
302
|
+
label: '上传',
|
|
303
|
+
icon: '📤',
|
|
304
|
+
action: () => this.handleUpload(null),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
label: '新建文件夹',
|
|
308
|
+
icon: '📁+',
|
|
309
|
+
action: () => console.log('新建文件夹'),
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
label: '刷新',
|
|
313
|
+
icon: '🔄',
|
|
314
|
+
action: () => console.log('刷新'),
|
|
315
|
+
},
|
|
316
|
+
];
|
|
317
|
+
return (
|
|
318
|
+
<Page className="p-[24px] bg-[var(--gray-50)] min-h-screen">
|
|
319
|
+
<View className="mb-[24px]">
|
|
320
|
+
<Text className="text-2xl font-bold text-[#1f2937]">文件管理器</Text>
|
|
321
|
+
<Text className="text-[#6b7280] text-sm mt-[4px]">
|
|
322
|
+
文件和目录管理
|
|
323
|
+
</Text>
|
|
324
|
+
</View>
|
|
325
|
+
<Card className="mb-[24px]">
|
|
326
|
+
<View className="gap-4 grid grid-cols-4">
|
|
327
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--blue-50)] rounded">
|
|
328
|
+
<Text className="text-3xl font-bold text-[var(--blue-600)]">
|
|
329
|
+
{totalFiles}
|
|
330
|
+
</Text>
|
|
331
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
332
|
+
文件总数
|
|
333
|
+
</Text>
|
|
334
|
+
</View>
|
|
335
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--green-50)] rounded">
|
|
336
|
+
<Text className="text-3xl font-bold text-[var(--green-600)]">
|
|
337
|
+
{this.formatFileSize(totalSize)}
|
|
338
|
+
</Text>
|
|
339
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
340
|
+
总大小
|
|
341
|
+
</Text>
|
|
342
|
+
</View>
|
|
343
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--orange-50)] rounded">
|
|
344
|
+
<Text className="text-3xl font-bold text-[var(--orange-600)]">
|
|
345
|
+
{totalFolders}
|
|
346
|
+
</Text>
|
|
347
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
348
|
+
文件夹
|
|
349
|
+
</Text>
|
|
350
|
+
</View>
|
|
351
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--purple-50)] rounded">
|
|
352
|
+
<Text className="text-3xl font-bold text-[var(--purple-600)]">
|
|
353
|
+
{this.formatFileSize(avgFileSize)}
|
|
354
|
+
</Text>
|
|
355
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
356
|
+
平均大小
|
|
357
|
+
</Text>
|
|
358
|
+
</View>
|
|
359
|
+
</View>
|
|
360
|
+
</Card>
|
|
361
|
+
<Card className="mb-[24px]">
|
|
362
|
+
<View className="flex items-center justify-between">
|
|
363
|
+
<View className="gap-4 flex items-center">
|
|
364
|
+
<Input
|
|
365
|
+
placeholder="搜索文件"
|
|
366
|
+
value={searchKeyword}
|
|
367
|
+
onChange={e => this.handleSearch(e.target.value)}
|
|
368
|
+
className=""
|
|
369
|
+
/>
|
|
370
|
+
<View className="gap-2 flex">
|
|
371
|
+
<Button
|
|
372
|
+
type={viewMode === 'grid' ? 'primary' : 'default'}
|
|
373
|
+
onClick={() => this.handleViewModeChange('grid')}
|
|
374
|
+
>
|
|
375
|
+
网格
|
|
376
|
+
</Button>
|
|
377
|
+
<Button
|
|
378
|
+
type={viewMode === 'list' ? 'primary' : 'default'}
|
|
379
|
+
onClick={() => this.handleViewModeChange('list')}
|
|
380
|
+
>
|
|
381
|
+
列表
|
|
382
|
+
</Button>
|
|
383
|
+
</View>
|
|
384
|
+
</View>
|
|
385
|
+
<View className="gap-2 flex">
|
|
386
|
+
{quickActions.map((action, index) => (
|
|
387
|
+
<Button
|
|
388
|
+
key={action.label}
|
|
389
|
+
onClick={action.action}
|
|
390
|
+
>{`${action.icon}${action.label}`}</Button>
|
|
391
|
+
))}
|
|
392
|
+
</View>
|
|
393
|
+
</View>
|
|
394
|
+
</Card>
|
|
395
|
+
{!!(viewMode === 'grid') && (
|
|
396
|
+
<Card className="mb-[24px]">
|
|
397
|
+
<Text className="block text-lg font-bold mb-[16px]">文件夹</Text>
|
|
398
|
+
<View className="gap-4 grid grid-cols-4">
|
|
399
|
+
{folders.map((folder, index) => (
|
|
400
|
+
<Text>{folderCard(folder)}</Text>
|
|
401
|
+
))}
|
|
402
|
+
</View>
|
|
403
|
+
</Card>
|
|
404
|
+
)}
|
|
405
|
+
<Card>
|
|
406
|
+
<View className="flex items-center justify-between mb-[16px]">
|
|
407
|
+
<Text className="text-lg font-bold">文件列表</Text>
|
|
408
|
+
<Text className="text-[#6b7280]">
|
|
409
|
+
共{filteredFiles.length}个文件
|
|
410
|
+
</Text>
|
|
411
|
+
</View>
|
|
412
|
+
{!!(viewMode === 'grid') && (
|
|
413
|
+
<View className="gap-4 grid grid-cols-4">
|
|
414
|
+
{filteredFiles.map((file, index) => (
|
|
415
|
+
<Text>{fileCard(file)}</Text>
|
|
416
|
+
))}
|
|
417
|
+
</View>
|
|
418
|
+
)}
|
|
419
|
+
{!(viewMode === 'grid') && (
|
|
420
|
+
<Table
|
|
421
|
+
columns={columns}
|
|
422
|
+
dataSource={filteredFiles}
|
|
423
|
+
rowKey="id"
|
|
424
|
+
onRow={record => ({
|
|
425
|
+
onClick: () => this.handleFileClick(record),
|
|
426
|
+
})}
|
|
427
|
+
/>
|
|
428
|
+
)}
|
|
429
|
+
</Card>
|
|
430
|
+
{!!(uploadProgress > 0 && uploadProgress < 100) && (
|
|
431
|
+
<Card className="mt-[24px]">
|
|
432
|
+
<Text className="block mb-[8px]">上传中...</Text>
|
|
433
|
+
<Progress percent={uploadProgress} />
|
|
434
|
+
</Card>
|
|
435
|
+
)}
|
|
436
|
+
</Page>
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export default Document;
|