fix: 价格字号随名称缩放、翻译表补全、编辑框全宽、下架修复
Some checks failed
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) Has been cancelled
Some checks failed
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) Has been cancelled
价格字号: - 用 clamp() 跟精油名同步缩放 - 不再硬编码 13px/11px 翻译表 (useOilTranslation): - 补充: 舒缓→Deep Blue, 保卫→On Guard, 乐活→DigestZen 等 - oilEn() 支持模糊匹配: 去掉/添加"复方""呵护"后缀再试 编辑弹窗: - form-input 加 width:100% + box-sizing:border-box - 去掉 max-width:400px 限制(已在上一次提交) 下架: - 需要重启后端才能生效(OilIn model 变更需重启 uvicorn) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,16 +134,12 @@
|
||||
</div>
|
||||
<div style="text-align:right;flex-shrink:0">
|
||||
<template v-if="viewMode === 'bottle'">
|
||||
<div style="font-size:13px;color:var(--sage-dark);font-weight:600">
|
||||
¥{{ (getMeta(name)?.bottlePrice || 0).toFixed(0) }}<span style="font-size:10px;font-weight:400;color:var(--text-light)">/瓶</span>
|
||||
</div>
|
||||
<div v-if="getMeta(name)?.retailPrice" style="font-size:11px;color:var(--text-light);text-decoration:line-through">¥{{ getMeta(name).retailPrice }}/瓶</div>
|
||||
<div class="oil-price-line">¥{{ (getMeta(name)?.bottlePrice || 0).toFixed(0) }}<span class="oil-price-unit">/瓶</span></div>
|
||||
<div v-if="getMeta(name)?.retailPrice" class="oil-retail-line">¥{{ getMeta(name).retailPrice }}/瓶</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="font-size:13px;color:var(--sage-dark);font-weight:600">
|
||||
¥{{ oils.pricePerDrop(name).toFixed(2) }}{{ name === '植物空胶囊' ? '/颗' : '/滴' }}
|
||||
</div>
|
||||
<div v-if="getMeta(name)?.retailPrice && getMeta(name)?.dropCount" style="font-size:11px;color:var(--text-light);text-decoration:line-through">
|
||||
<div class="oil-price-line">¥{{ oils.pricePerDrop(name).toFixed(2) }}<span class="oil-price-unit">{{ name === '植物空胶囊' ? '/颗' : '/滴' }}</span></div>
|
||||
<div v-if="getMeta(name)?.retailPrice && getMeta(name)?.dropCount" class="oil-retail-line">
|
||||
¥{{ (getMeta(name).retailPrice / getMeta(name).dropCount).toFixed(2) }}{{ name === '植物空胶囊' ? '/颗' : '/滴' }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -1045,10 +1041,12 @@ async function saveCardImage(name) {
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
min-width: 100px;
|
||||
padding: 8px 12px;
|
||||
border: 1.5px solid var(--border, #e0d4c0);
|
||||
border-radius: 8px;
|
||||
box-sizing: border-box;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
outline: none;
|
||||
@@ -1218,6 +1216,23 @@ async function saveCardImage(name) {
|
||||
color: var(--text-light);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.oil-price-line {
|
||||
font-size: clamp(10px, 2.2vw, 13px);
|
||||
color: var(--sage-dark);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.oil-price-unit {
|
||||
font-size: clamp(8px, 1.6vw, 10px);
|
||||
font-weight: 400;
|
||||
color: var(--text-light);
|
||||
}
|
||||
.oil-retail-line {
|
||||
font-size: clamp(8px, 1.6vw, 11px);
|
||||
color: var(--text-light);
|
||||
text-decoration: line-through;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.oil-chip-actions {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user