fix: 小卡片字号恢复 + 配方卡片布局优化
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 53s

小卡片(RecipeCard):
- 恢复原始固定字号16px

配方卡片(RecipeDetailOverlay):
- doTERRA行上移与二维码顶端对齐
- 二维码左移与内容右侧对齐
- 配方名自适应字号(26/22/18/16px)
- 允许最多两行显示,text-wrap:balance均匀分配

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 17:54:08 +00:00
parent 2da0130c4c
commit c3c531522e
2 changed files with 19 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="recipe-card" @click="$emit('click', index)">
<div class="recipe-card-name" :style="{ fontSize: nameSize }">{{ recipe.name }}</div>
<div class="recipe-card-name">{{ recipe.name }}</div>
<div v-if="visibleTags.length" class="recipe-card-tags">
<span v-for="tag in visibleTags" :key="tag" class="tag" :class="{ 'tag-reviewed': tag === '已审核' }">{{ tag }}</span>
</div>
@@ -47,15 +47,6 @@ const oilNames = computed(() =>
)
const priceInfo = computed(() => oilsStore.fmtCostWithRetail(props.recipe.ingredients))
const isFav = computed(() => recipesStore.isFavorite(props.recipe))
const nameSize = computed(() => {
const len = props.recipe.name.length
if (len <= 6) return '16px'
if (len <= 8) return '15px'
if (len <= 10) return '14px'
if (len <= 14) return '12px'
if (len <= 20) return '10px'
return '9px'
})
</script>
<style scoped>
@@ -81,7 +72,6 @@ const nameSize = computed(() => {
font-weight: 600;
color: #2c2416;
margin-bottom: 8px;
word-break: break-all;
}
.recipe-card-tags {