|
|
@@ -1,5 +1,7 @@
|
|
|
import React, { useState } from 'react';
|
|
|
import { Plus, Search, Edit2, Trash2, MoreVertical, ChevronRight, ChevronDown } from 'lucide-react';
|
|
|
+import { Button } from 'antd';
|
|
|
+import { Button as UIButton } from './ui/button';
|
|
|
import DepartmentManagement from './DepartmentManagement';
|
|
|
import MenuManagement from './MenuManagement';
|
|
|
import PostManagement from './PostManagement';
|
|
|
@@ -1001,26 +1003,32 @@ export default function SystemConfig({ subMenu }: SystemConfigProps) {
|
|
|
))}
|
|
|
<td className="px-6 py-4">
|
|
|
<div className="flex items-center justify-center gap-2">
|
|
|
- <button
|
|
|
+ <Button
|
|
|
+ variant="ghost"
|
|
|
+ size="sm"
|
|
|
onClick={() => handleEdit(row)}
|
|
|
- className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
|
|
|
- title="编辑"
|
|
|
+ className="h-8 px-2"
|
|
|
>
|
|
|
<Edit2 className="w-4 h-4" />
|
|
|
- </button>
|
|
|
- <button
|
|
|
+ <span className="ml-1">编辑</span>
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ variant="ghost"
|
|
|
+ size="sm"
|
|
|
onClick={() => handleDelete(row.id)}
|
|
|
- className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
|
|
|
- title="删除"
|
|
|
+ className="h-8 px-2 text-red-600 hover:text-red-700"
|
|
|
>
|
|
|
<Trash2 className="w-4 h-4" />
|
|
|
- </button>
|
|
|
- <button
|
|
|
- className="p-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"
|
|
|
- title="更多"
|
|
|
+ <span className="ml-1">删除</span>
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ variant="ghost"
|
|
|
+ size="sm"
|
|
|
+ className="h-8 px-2"
|
|
|
>
|
|
|
<MoreVertical className="w-4 h-4" />
|
|
|
- </button>
|
|
|
+ <span className="ml-1">更多</span>
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -1030,30 +1038,30 @@ export default function SystemConfig({ subMenu }: SystemConfigProps) {
|
|
|
</div>
|
|
|
|
|
|
{/* 分页 */}
|
|
|
- <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
|
|
|
- <div className="flex items-center justify-between">
|
|
|
- <div className="text-sm text-gray-600">
|
|
|
- 共 <span className="text-blue-600">{filteredData.length}</span> 条记录
|
|
|
- </div>
|
|
|
- <div className="flex gap-2">
|
|
|
- <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
|
- 上一页
|
|
|
- </button>
|
|
|
- <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
|
|
|
- 1
|
|
|
- </button>
|
|
|
- <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
|
- 2
|
|
|
- </button>
|
|
|
- <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
|
- 3
|
|
|
- </button>
|
|
|
- <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
|
- 下一页
|
|
|
- </button>
|
|
|
+ {filteredData.length > 0 && (
|
|
|
+ <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
|
|
|
+ <div className="flex items-center justify-between">
|
|
|
+ <div className="text-sm text-gray-600">
|
|
|
+ 共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
|
|
|
+ </div>
|
|
|
+ <div className="flex gap-2">
|
|
|
+ <Button
|
|
|
+ disabled={true}
|
|
|
+ >
|
|
|
+ 上一页
|
|
|
+ </Button>
|
|
|
+ <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
|
|
|
+ 1 / 1
|
|
|
+ </span>
|
|
|
+ <Button
|
|
|
+ disabled={true}
|
|
|
+ >
|
|
|
+ 下一页
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
)}
|
|
|
|