feat: Header重排、共享配方到公共库、待审核配方、权限优化 #17
@@ -68,7 +68,7 @@ export const useOilsStore = defineStore('oils', () => {
|
||||
bottlePrice: oil.bottle_price,
|
||||
dropCount: oil.drop_count,
|
||||
retailPrice: oil.retail_price ?? null,
|
||||
isActive: oil.is_active ?? true,
|
||||
isActive: oil.is_active !== 0,
|
||||
enName: oil.en_name ?? null,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,9 +330,11 @@
|
||||
|
||||
<div style="display:flex;gap:10px;justify-content:space-between;margin-top:16px">
|
||||
<button
|
||||
style="padding:8px 14px;border-radius:8px;font-size:13px;cursor:pointer;font-family:inherit;border:1.5px solid #e8b4b0;background:transparent;color:#c0392b"
|
||||
:style="getMeta(editingOilName)?.isActive === false
|
||||
? 'padding:8px 14px;border-radius:8px;font-size:13px;cursor:pointer;font-family:inherit;border:1.5px solid #ccc;background:#f0f0f0;color:#999'
|
||||
: 'padding:8px 14px;border-radius:8px;font-size:13px;cursor:pointer;font-family:inherit;border:1.5px solid #e8b4b0;background:transparent;color:#c0392b'"
|
||||
@click="toggleOilActive"
|
||||
>{{ getMeta(editingOilName)?.isActive === false ? '重新上架' : '下架' }}</button>
|
||||
>{{ getMeta(editingOilName)?.isActive === false ? '✓ 已下架 · 点击重新上架' : '下架' }}</button>
|
||||
<div style="display:flex;gap:10px">
|
||||
<button class="btn-outline" @click="editingOilName = null">取消</button>
|
||||
<button class="btn-primary" @click="saveEditOil">保存</button>
|
||||
@@ -702,7 +704,6 @@ async function toggleOilActive() {
|
||||
await oils.loadOils()
|
||||
cardVersion.value++
|
||||
ui.showToast(newActive ? '已重新上架' : '已下架')
|
||||
editingOilName.value = null
|
||||
} catch (e) {
|
||||
ui.showToast('网络错误: ' + e.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user