This commit is contained in:
2022-12-12 09:28:31 +08:00
parent db74c76a3a
commit 8e4f8dd45f
4 changed files with 11 additions and 7 deletions

View File

@@ -115,8 +115,10 @@ const onBlur = (event: Event) => {
}
if(props.qfw){
try{
console.log("添加,", new Number(props.modelValue).toLocaleString())
currentValue.value = new Number(props.modelValue).toLocaleString()
let reg = /\d{1,3}(?=(\d{3})+$)/g;
// new String(props.modelValue).replace(reg, '$&,');
console.log("添加,", new String(props.modelValue).replace(reg, '$&,'))
currentValue.value = new String(props.modelValue).replace(reg, '$&,');
}catch{
currentValue.value = "输入错误"
}