fix: 拖选文字时弹窗不再误关闭 #27

Merged
hera merged 16 commits from fix/next-batch into main 2026-04-12 14:11:46 +00:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 0f7ae6ecc7 - Show all commits

View File

@@ -78,7 +78,7 @@ const navTabsRef = ref(null)
// hide: 完全隐藏(只有满足条件才显示)
const allTabs = [
{ key: 'search', icon: '🔍', label: '配方查询' },
{ key: 'manage', icon: '📋', label: '管理配方', hide: 'editor' },
{ key: 'manage', icon: '📋', label: '管理配方', require: 'login' },
{ key: 'inventory', icon: '📦', label: '个人库存', require: 'login' },
{ key: 'oils', icon: '💧', label: '精油价目' },
{ key: 'projects', icon: '💼', label: '商业核算', require: 'login' },

View File

@@ -1,5 +1,11 @@
<template>
<div class="recipe-manager">
<!-- Login prompt for non-logged-in users -->
<div v-if="!auth.isLoggedIn" class="login-prompt">
<p>登录后可管理配方创建个人配方集</p>
<button class="btn-primary" @click="ui.openLogin()">登录 / 注册</button>
</div>
<template v-else>
<!-- Review Bar (admin + senior_editor with assigned reviews) -->
<div v-if="(auth.isAdmin || auth.canManage) && pendingCount > 0" class="review-bar" @click="showPending = !showPending" >
📝 待审核配方: {{ pendingCount }}
@@ -388,6 +394,7 @@
@save="onTagPickerSave"
@close="showTagPicker = false"
/>
</template>
</div>
</template>
@@ -1672,6 +1679,11 @@ watch(() => recipeStore.recipes, () => {
padding: 0 12px 24px;
}
.login-prompt {
text-align: center; padding: 60px 20px; color: #6b6375;
}
.login-prompt p { margin-bottom: 16px; font-size: 15px; }
.review-bar {
background: linear-gradient(135deg, #fff3e0, #ffe0b2);
padding: 12px 16px;