This commit is contained in:
hailin 2025-03-30 14:10:00 +08:00
parent cb7bc22a07
commit d78ec33f68
1 changed files with 12 additions and 8 deletions

View File

@ -236,14 +236,18 @@ export function DetailPageHeader({ data }: { data: any }) {
</div>
</div>
{/* 删除按钮 */}
<button
onClick={handleDelete}
className="text-red-500 hover:text-red-700 transition self-end"
disabled={loading}
>
<Trash2 size={20} />
</button>
{/* 条件显示删除按钮 */}
{data?.canDelete && (
<button
onClick={handleDelete}
className="hover:text-gray-700 transition self-end"
disabled={loading}
title="删除"
>
<Trash2 size={20} />
</button>
)}
</div>
</div>