<a-input-number :min="0"
:max="100"
:step="1"
:formatter="(value)=>{
let reg = /^(-)*(\d+)\.(\d).*$/;
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',').replace(reg,'$1$2.$3');}"
:parser="(value)=>{
let reg = /^(-)*(\d+)\.(\d).*$/;
return value.replace(/\s?|(,*)/g, '').replace(reg,'$1$2.$3');
}"
v-model="item.branch" />
网友评论