This commit is contained in:
Theluyuan 2022-12-12 15:48:55 +08:00
parent 61c20fc6b6
commit 1475322d91
4 changed files with 41 additions and 35 deletions

View File

@ -118,10 +118,12 @@ const _sfc_main = defineComponent({
t += l[i] + "";
}
}
let z = (noNegative ? "" : "-") + t.split("").reverse().join("");
z = isNaN(z) ? 0 : z;
if (r) {
return (noNegative ? "" : "-") + t.split("").reverse().join("") + "." + r;
return z + "." + r;
} else {
return (noNegative ? "" : "-") + t.split("").reverse().join("");
return z;
}
};
watch(() => props.type, () => {

View File

@ -11214,10 +11214,12 @@ const _sfc_main$1v = defineComponent({
t += l[i] + "";
}
}
let z = (noNegative ? "" : "-") + t.split("").reverse().join("");
z = isNaN(z) ? 0 : z;
if (r) {
return (noNegative ? "" : "-") + t.split("").reverse().join("") + "." + r;
return z + "." + r;
} else {
return (noNegative ? "" : "-") + t.split("").reverse().join("");
return z;
}
};
watch(() => props.type, () => {

View File

@ -81,11 +81,13 @@ const formatMoney = function (s: string) {
t += l[i] + ""; //
}
}
let z:any = (noNegative ? "" : "-") + t.split("").reverse().join("")
z = isNaN(z) ? 0 : z
if(r){
return (noNegative ? "" : "-") + t.split("").reverse().join("") + "." + r;
return z+ "." + r;
}else{
return (noNegative ? "" : "-") + t.split("").reverse().join("")
return z
}
}

File diff suppressed because one or more lines are too long