feat: 操作日志重写+已审核标签+配方名自适应
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Successful in 1m0s
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Successful in 1m0s
操作日志: - 完全重写,正确映射所有 action 类型(配方/精油/用户/标签/审核) - 三级筛选:操作类型、用户、对象类型 - 正确解析 detail JSON 显示来源/原因/角色等 - 包含精油价目修改记录 已审核标签: - editor+ 可见可编辑,viewer 不可见 - 蓝色样式区分 其他: - 配方卡片名称过长自动缩小字号 - 配方编辑器加新增标签输入框 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -293,6 +293,10 @@
|
||||
<div class="candidate-tags" v-if="formCandidateTags.length">
|
||||
<span v-for="tag in formCandidateTags" :key="tag" class="candidate-tag" @click="toggleFormTag(tag)">+ {{ tag }}</span>
|
||||
</div>
|
||||
<div class="tag-input-row">
|
||||
<input v-model="newTagInput" type="text" class="editor-input" placeholder="添加新标签..." @keydown.enter="addNewFormTag" style="flex:1" />
|
||||
<button class="action-btn action-btn-sm" @click="addNewFormTag" :disabled="!newTagInput.trim()">+</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Total cost -->
|
||||
@@ -597,10 +601,20 @@ function onOilBlur(ing) {
|
||||
}, 150)
|
||||
}
|
||||
|
||||
const newTagInput = ref('')
|
||||
|
||||
const formCandidateTags = computed(() =>
|
||||
recipeStore.allTags.filter(t => !formTags.value.includes(t))
|
||||
)
|
||||
|
||||
function addNewFormTag() {
|
||||
const tag = newTagInput.value.trim()
|
||||
if (tag && !formTags.value.includes(tag)) {
|
||||
formTags.value.push(tag)
|
||||
}
|
||||
newTagInput.value = ''
|
||||
}
|
||||
|
||||
const DROPS_PER_ML = 18.6
|
||||
|
||||
const formDilutionHint = computed(() => {
|
||||
@@ -1367,6 +1381,7 @@ watch(() => recipeStore.recipes, () => {
|
||||
.candidate-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
|
||||
.candidate-tag { background: #f0eeeb; color: #6b6375; padding: 4px 10px; border-radius: 12px; font-size: 12px; cursor: pointer; }
|
||||
.candidate-tag:hover { background: #e8f5e9; color: #2e7d5a; }
|
||||
.tag-input-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
|
||||
.editor-total { text-align: right; font-size: 15px; font-weight: 600; color: #4a9d7e; padding: 10px 0; border-top: 1px solid #eee; }
|
||||
.action-btn { border: 1.5px solid #d4cfc7; background: #fff; color: #6b6375; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap; }
|
||||
.action-btn:hover { background: #f8f7f5; }
|
||||
|
||||
Reference in New Issue
Block a user