From f5fbc0469af3be711ff924a458a268be52786b61 Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Thu, 23 Apr 2026 21:33:01 +0800 Subject: [PATCH] =?UTF-8?q?improvement(sns-ui):=20=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=AF=BC=E5=87=BA=E4=B8=BB=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=B9=B6=E7=B2=BE=E7=AE=80=E4=BB=BB=E5=8A=A1=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将开始导出与取消导出收敛为同一主操作按钮 - 精简任务状态区,仅保留导出完成后的保存操作 - 减少重复按钮与状态噪音,统一导出面板交互 --- frontend/pages/sns.vue | 82 +++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 50 deletions(-) diff --git a/frontend/pages/sns.vue b/frontend/pages/sns.vue index 6e37b16..e8daf15 100644 --- a/frontend/pages/sns.vue +++ b/frontend/pages/sns.vue @@ -593,32 +593,15 @@
当前导出任务
ID:{{ exportJob.exportId || '-' }}
-
- - 状态:{{ exportStatusText }} - - - {{ exportOverallPercent }}% - - - -
+
@@ -815,15 +798,6 @@
已选 {{ exportSelectedCount }} 人
-
@@ -1139,17 +1114,6 @@ const exportActiveFormatLabel = computed(() => { return exportFormatOptions.find((item) => item.value === exportActiveFormat.value)?.label || 'HTML' }) -const exportStatusText = computed(() => { - const status = String(exportJob.value?.status || '').trim() - return { - queued: '排队中', - running: '导出中', - done: '已完成', - error: '失败', - cancelled: '已取消' - }[status] || status || '-' -}) - const exportOverallPercent = computed(() => { const status = String(exportJob.value?.status || '').trim() if (status === 'done') return 100 @@ -1187,6 +1151,24 @@ const canCancelSnsExport = computed(() => { return status === 'queued' || status === 'running' }) +const exportPrimaryActionLabel = computed(() => { + if (canCancelSnsExport.value) return isExportCancelling.value ? '取消中…' : '取消导出' + return isSnsExportBusy.value ? '导出中…' : '开始导出' +}) + +const exportPrimaryActionDisabled = computed(() => { + if (canCancelSnsExport.value) return isExportCancelling.value + return !selectedAccount.value || !exportSelectedCount.value || isSnsExportBusy.value +}) + +const handleExportPrimaryAction = async () => { + if (canCancelSnsExport.value) { + await cancelSnsExportJob() + return + } + await startSnsExportFromModal() +} + const normalizeExportSelectedUsernames = (list) => { const validUsernames = new Set( visibleSnsUsers.value