|
@@ -53,9 +53,12 @@ watchEffect(() => {
|
|
|
inpVal.value = modelValue1.value;
|
|
|
}
|
|
|
})
|
|
|
+function isValidNumber(value) {
|
|
|
+ return typeof value === 'number' && value === value;
|
|
|
+}
|
|
|
|
|
|
-const onePoolNum = computed(() => (modelValue1.value && modelValue1.value !=0 ) ? Number((modelValue1.value || 0).toFixed(2)) : '--');
|
|
|
-const twoPoolNum = computed(() => (modelValue2.value && modelValue2.value !=0 ) ? Number((modelValue2.value || 0).toFixed(2)) : '--');
|
|
|
+const onePoolNum = computed(() => (isValidNumber(modelValue1.value)) ? Number((modelValue1.value || 0).toFixed(2)) : '--');
|
|
|
+const twoPoolNum = computed(() => (isValidNumber(modelValue2.value)) ? Number((modelValue2.value || 0).toFixed(2)) : '--');
|
|
|
|
|
|
const onInpCancel = (val) => {
|
|
|
inpVal.value = val;
|