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>
</div> </div>
{/* 删除按钮 */} {/* 条件显示删除按钮 */}
<button {data?.canDelete && (
onClick={handleDelete} <button
className="text-red-500 hover:text-red-700 transition self-end" onClick={handleDelete}
disabled={loading} className="hover:text-gray-700 transition self-end"
> disabled={loading}
<Trash2 size={20} /> title="删除"
</button> >
<Trash2 size={20} />
</button>
)}
</div> </div>
</div> </div>