@@ -180,8 +180,13 @@
- |
- {{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil)) : '-' }} |
+
+
+
+ {{ oilsStore.unitLabel(ing.oil) }}
+
+ |
+ {{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil)) : '-' }}/{{ oilsStore.unitLabel(ing.oil) }} |
{{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil) * (ing.drops || 0)) : '-' }} |
|
@@ -1703,6 +1708,8 @@ async function saveRecipe() {
.editor-drops:focus {
border-color: var(--sage, #7a9e7e);
}
+.drops-with-unit { display: flex; align-items: center; gap: 2px; }
+.unit-hint { font-size: 11px; color: #b0aab5; white-space: nowrap; }
.ing-ppd {
font-size: 12px;
diff --git a/frontend/src/views/OilReference.vue b/frontend/src/views/OilReference.vue
index f221778..fb681bc 100644
--- a/frontend/src/views/OilReference.vue
+++ b/frontend/src/views/OilReference.vue
@@ -146,9 +146,9 @@
¥{{ getMeta(name).retailPrice }}/瓶
- ¥{{ oils.pricePerDrop(name).toFixed(2) }}{{ name === '植物空胶囊' ? '/颗' : '/滴' }}
+ ¥{{ oils.pricePerDrop(name).toFixed(2) }}/{{ oils.unitLabel(name) }}
- ¥{{ (getMeta(name).retailPrice / getMeta(name).dropCount).toFixed(2) }}{{ name === '植物空胶囊' ? '/颗' : '/滴' }}
+ ¥{{ (getMeta(name).retailPrice / getMeta(name).dropCount).toFixed(2) }}/{{ oils.unitLabel(name) }}
@@ -172,7 +172,7 @@
¥ {{ (getMeta(activeCardName).bottlePrice || 0).toFixed(2) }}
- · ¥ {{ oils.pricePerDrop(activeCardName).toFixed(4) }}/滴
+ · ¥ {{ oils.pricePerDrop(activeCardName).toFixed(4) }}/{{ oils.unitLabel(activeCardName) }}
@@ -231,18 +231,18 @@
{{ getMeta(selectedOilName)?.bottlePrice != null ? ('¥ ' + getMeta(selectedOilName).bottlePrice.toFixed(2)) : '--' }}
- 总滴数
- {{ getMeta(selectedOilName)?.dropCount || '--' }}
+ {{ oils.isMlUnit(selectedOilName) ? '总容量' : '总滴数' }}
+ {{ getMeta(selectedOilName)?.dropCount || '--' }}{{ oils.isMlUnit(selectedOilName) ? 'ml' : '' }}
- 每滴价格
+ 每{{ oils.unitLabel(selectedOilName) }}价格
{{ oils.pricePerDrop(selectedOilName) ? ('¥ ' + oils.pricePerDrop(selectedOilName).toFixed(4)) : '--' }}
零售价
¥ {{ getMeta(selectedOilName).retailPrice.toFixed(2) }}
-
+
每ml价格
{{ oils.pricePerDrop(selectedOilName) ? ('¥ ' + (oils.pricePerDrop(selectedOilName) * DROPS_PER_ML).toFixed(2)) : '--' }}
@@ -474,6 +474,7 @@ for (const [ml, drops] of Object.entries(VOLUME_OPTIONS)) {
function volumeLabel(dropCount, name) {
if (dropCount === 160) return '160颗'
+ if (oils.isMlUnit(name)) return dropCount + 'ml'
return DROPS_TO_VOLUME[dropCount] || (dropCount + '滴')
}
diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue
index d72ff49..5808480 100644
--- a/frontend/src/views/RecipeManager.vue
+++ b/frontend/src/views/RecipeManager.vue
@@ -271,7 +271,7 @@