feat: ml产品全局适配 — 编辑器/价目/详情统一显示ml单位
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 50s
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 50s
- 编辑器: 表头改为"成分/用量/单价",每行显示对应单位(滴/ml) - 精油价目: ml产品显示"总容量Xml"和"每ml价格",精油保持"每滴" - 知识卡片/配方详情: 单位跟随产品类型 - 精油的"每ml价格"行对ml产品隐藏(已是ml单位) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
<div class="editor-section">
|
||||
<table class="editor-table">
|
||||
<thead>
|
||||
<tr><th>精油</th><th>滴数</th><th>单价/滴</th><th>小计</th><th></th></tr>
|
||||
<tr><th>成分</th><th>用量</th><th>单价</th><th>小计</th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(ing, i) in editEoIngredients" :key="'eo-'+i">
|
||||
@@ -180,8 +180,13 @@
|
||||
<option v-for="name in oilsStore.oilNames" :key="name" :value="name">{{ name }}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input v-model.number="ing.drops" type="number" min="0.5" step="0.5" class="editor-drops" /></td>
|
||||
<td class="ing-ppd">{{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil)) : '-' }}</td>
|
||||
<td>
|
||||
<div class="drops-with-unit">
|
||||
<input v-model.number="ing.drops" type="number" min="0.5" step="0.5" class="editor-drops" />
|
||||
<span class="unit-hint">{{ oilsStore.unitLabel(ing.oil) }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="ing-ppd">{{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil)) : '-' }}/{{ oilsStore.unitLabel(ing.oil) }}</td>
|
||||
<td class="ing-cost">{{ ing.oil ? oilsStore.fmtPrice(oilsStore.pricePerDrop(ing.oil) * (ing.drops || 0)) : '-' }}</td>
|
||||
<td><button class="remove-row-btn" @click="editIngredients.splice(editIngredients.indexOf(ing), 1)">✕</button></td>
|
||||
</tr>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user