ux: 新建账户按钮移到社保/公积金Tab内部,按类型显示

按钮从页面顶部移到Tab内容区顶部,文案改为"新建社保账户"/"新建公积金账户",
明确表示新建的是当前Tab对应类型的账户。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-16 15:10:38 +08:00
parent de4f8c90fb
commit 54d138cc73
2 changed files with 109 additions and 83 deletions
+7 -6
View File
@@ -175,11 +175,6 @@ export default function SocialInsurance() {
<p className="mt-1 text-sm text-gray-500"></p>
</div>
</div>
{(tab === 'social' || tab === 'housing') && (
<Button size="sm" onClick={() => { setEditAccount(null); setShowAccountForm(true) }}>
<Plus className="w-4 h-4 mr-1" />
</Button>
)}
</div>
{/* Tab 切换 */}
@@ -200,10 +195,16 @@ export default function SocialInsurance() {
{/* ========== 社保 / 公积金 Tab:账户卡片列表 ========== */}
{(tab === 'social' || tab === 'housing') && (
<div className="space-y-3">
{/* 新建对应类型账户按钮 */}
<div className="flex justify-end">
<Button size="sm" onClick={() => { setEditAccount(null); setShowAccountForm(true) }}>
<Plus className="w-4 h-4 mr-1" />{tab === 'housing' ? '公积金' : '社保'}
</Button>
</div>
{accounts.length === 0 ? (
<Card>
<div className="text-center py-8 text-gray-500">
{tab === 'housing' ? '公积金' : '社保'}
{tab === 'housing' ? '公积金' : '社保'}{tab === 'housing' ? '公积金' : '社保'}
</div>
</Card>
) : (