We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if (cell.style.numFmt) { if (cell.style.numFmt.endsWith("%")) { let precision = cell.style.numFmt.match(/\.(\d+)%/); if (precision) { return (value * 100).toFixed(precision[1].length) + "%"; } else { return value * 100 + "%"; } } else if (/0(\.0+)?/.test(cell.style.numFmt)) { let prefix = ""; if (cell.style.numFmt.startsWith("$")) { prefix = "$"; } else if (cell.style.numFmt.startsWith('"¥')) { prefix = "¥"; } if (value === 0 && cell.style.numFmt.startsWith("_")) { return "-"; } let precision = cell.style.numFmt.match(/0\.(0+)(_|;|$)/); if (precision) { precision = precision[1].length; } else { precision = 0; } let result = value.toFixed(precision) + ""; if (cell.style.numFmt.includes("#,##")) { //千分位 result = result.split("."); let number = result[0].split("").reverse(); let newNumber = []; for (let i = 0; i < number.length; i++) { newNumber.push(number[i]); if ( (i + 1) % 3 === 0 && i < number.length - 1 && number[i + 1] !== "-" ) { newNumber.push(","); } } result[0] = newNumber.reverse().join(""); result = result.join("."); } return prefix + result; } } return value.toFixed(1) + "";
大佬有时间优化吗? x-data-spreadsheet 这个库不知道为啥会自动 聚焦,github 库上有 autoFocus 但是我看大佬依赖包没有这个配置项
The text was updated successfully, but these errors were encountered:
No branches or pull requests
大佬有时间优化吗?
x-data-spreadsheet 这个库不知道为啥会自动 聚焦,github 库上有 autoFocus 但是我看大佬依赖包没有这个配置项
The text was updated successfully, but these errors were encountered: