qfw
This commit is contained in:
@@ -142,7 +142,7 @@ const _sfc_main = 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;
|
||||
@@ -160,8 +160,8 @@ const _sfc_main = 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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user