feat:编辑菜品时自动切换是否涨价

This commit is contained in:
dzc committed 2026-04-29 15:45:57 +08:00
1 parent 0a138d258d
commit 1d132425b6
2 files changed
+14 -4

No files matched your search

+10
View File
@@ -165,6 +165,16 @@ const dataRules = ref({
virtualSalesCount: [{ validator: rule.number, trigger: "blur" }],
})
watch(() => form.categoryId, (newVal, oldVal) => {
if (newVal !== oldVal) {
if (["1906350354126798850", "1879343931557081090"].includes(newVal)) {
form.isPriceIncreased = '0'
} else {
form.isPriceIncreased = '1'
}
}
}, { deep: true })
// 打开弹窗
const openDialog = async (id: string) => {
visible.value = true