jufubao-mall 2.0.53-beta2 → 2.0.53-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -669,7 +669,7 @@ export default {
|
|
|
669
669
|
this.update();
|
|
670
670
|
this.closeQueryModal();
|
|
671
671
|
},
|
|
672
|
-
//
|
|
672
|
+
// 价格输入格式化,最多保留两位小数(直接截断,不四舍五入)
|
|
673
673
|
handlePriceBlur(e, type) {
|
|
674
674
|
const value = e.target.value;
|
|
675
675
|
if (!value) {
|
|
@@ -677,10 +677,10 @@ export default {
|
|
|
677
677
|
else this.endPrice = '';
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
//
|
|
680
|
+
// 最多保留两位小数,直接截断,去除末尾多余的零
|
|
681
681
|
const numValue = parseFloat(value);
|
|
682
682
|
if (!isNaN(numValue)) {
|
|
683
|
-
const formatted =
|
|
683
|
+
const formatted = parseFloat(Math.floor(numValue * 100) / 100);
|
|
684
684
|
if (type === 'start') this.startPrice = formatted;
|
|
685
685
|
else this.endPrice = formatted;
|
|
686
686
|
} else {
|