This commit is contained in:
2022-12-12 09:36:12 +08:00
parent 80c457a21b
commit 937a34f05e
4 changed files with 11 additions and 11 deletions

View File

@@ -11238,7 +11238,7 @@ const _sfc_main$1v = defineComponent({
if (props.qfw) {
var formatMoney = function(s) {
var noNegative = true;
s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
s = parseFloat((s + "").replace(/[^\d\.-]/g, "")) + "";
if (parseFloat(s) < 0) {
s = Math.abs(s).toFixed(2) + "";
noNegative = false;
@@ -11256,8 +11256,8 @@ const _sfc_main$1v = defineComponent({
};
try {
let reg = /\d{1,3}(?=(\d{3})+$)/g;
console.log("\u6DFB\u52A0\uFF0C", formatMoney(props.modelValue));
currentValue.value = formatMoney(props.modelValue);
console.log("\u6DFB\u52A0\uFF0C", formatMoney(props.modelValue.toString()));
currentValue.value = formatMoney(props.modelValue.toString());
} catch {
currentValue.value = "\u8F93\u5165\u9519\u8BEF";
}