From e78a446abed3c1b53b3728e99fd2bea8171bd3a4 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Fri, 10 Apr 2026 10:57:03 +0000 Subject: [PATCH] =?UTF-8?q?UI:=20=E7=AE=A1=E7=90=86=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=8C=89=E8=A7=92=E8=89=B2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 管理员: 搜索 + 导出Excel | 添加 + 全选 + 标签 + 批量 - 编辑者: 搜索 | 添加 + 全选 + 标签 + 批量(无导出) - 普通用户: 全选 + 标签(无添加无导出) - 批量操作改为下拉选择,内联在工具栏 - 我的配方和公共配方库默认折叠 Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/views/RecipeManager.vue | 51 +++++++++++++++------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index f886887..b21e544 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -14,35 +14,39 @@ - + - +
+ - + +
- -
- 已选 {{ selectedIds.size + selectedDiaryIds.size }} 项 - - - - - -
-

@@ -452,6 +446,14 @@ function toggleDiarySelect(id) { function clearSelection() { selectedIds.clear() selectedDiaryIds.clear() + batchAction.value = '' +} + +function onBatchSelect() { + if (batchAction.value) { + executeBatchAction(batchAction.value) + batchAction.value = '' + } } function toggleSelectAllDiary() { @@ -797,7 +799,8 @@ async function saveAllParsed() { const sharedCount = ref({ adopted: 0, total: 0 }) const previewRecipeIndex = ref(null) -const showMyRecipes = ref(true) +const batchAction = ref('') +const showMyRecipes = ref(false) const showPublicRecipes = ref(false) const showReviewHistory = ref(false) const reviewHistory = ref([]) @@ -1399,6 +1402,8 @@ watch(() => recipeStore.recipes, () => { .drops-sm:focus { border-color: #7ec6a4; } .select-sm { padding: 4px 6px; border: 1.5px solid #d4cfc7; border-radius: 6px; font-size: 12px; font-family: inherit; background: #fff; width: auto; } .btn-select-active { background: #e8f5e9; color: #2e7d5a; border: 1.5px solid #7ec6a4; border-radius: 10px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-family: inherit; font-weight: 600; } +.batch-count { font-size: 12px; color: #4a9d7e; font-weight: 600; white-space: nowrap; } +.batch-select { padding: 5px 8px; border: 1.5px solid #d4cfc7; border-radius: 8px; font-size: 12px; font-family: inherit; background: #fff; } .divider-text { text-align: center;