摘要:
limitDecimals = value => { const reg = /^(\-)*(\d+)\.(\d).*$/; if (typeof value 'string') { return !isNaN(Number(value)) ? value.replace(reg, '$1$2.$3 阅读全文
摘要:
原生js判断有没有class hasClass = (ele, cName) => { let reg = new RegExp("(?:^| +)" + cName + "(?: +|$)", "g"); if(ele.className undefined){ return false; }el 阅读全文