From 0dd723f1db26d905b577f228e406ccc2d54cd133 Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Tue, 6 Aug 2024 23:03:25 +0800 Subject: [PATCH] uu --- components/buns-post-edit-templates/bpe-cost-tmp.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/buns-post-edit-templates/bpe-cost-tmp.vue b/components/buns-post-edit-templates/bpe-cost-tmp.vue index 8284bdc..4586a38 100644 --- a/components/buns-post-edit-templates/bpe-cost-tmp.vue +++ b/components/buns-post-edit-templates/bpe-cost-tmp.vue @@ -163,12 +163,13 @@ searchParam: { handler(newVal, oldVal){ let vals = Object.values(newVal) + if(JSON.stringify(newVal) == JSON.stringify(oldVal || {})) { + return false + } // 所有关联入参都有值再 执行自动计算,数据未变化不做计算 if(vals.length == vals.filter(v => !!v).length) { - if(JSON.stringify(newVal) != JSON.stringify(oldVal || {})) { - console.log("====watch cost calcWaybillFee===") - this.calcWaybillFee(newVal); - } + console.log("====watch cost calcWaybillFee===") + this.calcWaybillFee(newVal); } }, deep: true,