瀏覽代碼

[ADD] payment residual calculation

Gogs 7 年之前
父節點
當前提交
fc64d38633
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/components/steps/PaymentAmount.vue

+ 3 - 3
src/components/steps/PaymentAmount.vue

@@ -45,12 +45,12 @@
         ]),
         watch: {
             amountReceived(value) {
-                console.log(value)
+                this.computeAmountResidual(value)
             }
         },
         methods: {
-            computeAmountResidual() {
-
+            computeAmountResidual(value) {
+                this.amountResidual = this.cartTotal - parseFloat(value)
             }
         },
         data() {