VUE 打包正则报错:Error parsing regular expression: Invalid regular expression:
需要用new RegExp代替//
如:
num = num.replace(/(?<=\d\.\d{2})./, '');
换成 let reg = new RegExp("(?<=\\d\\.\\d{2}).","g"); num = num.replace(reg, '');
需要用new RegExp代替//
如:
num = num.replace(/(?<=\d\.\d{2})./, '');
换成 let reg = new RegExp("(?<=\\d\\.\\d{2}).","g"); num = num.replace(reg, '');