daily: 2021-09-26

This commit is contained in:
2021-09-27 00:40:21 +08:00
parent 93e19c05af
commit fb671cd62a
22 changed files with 2295 additions and 64 deletions
+6
View File
@@ -0,0 +1,6 @@
// 为了解决svg text不渲染连续空格,对html转义并替换空格为 
export default function escapeHtml(text) {
const span = document.createElement("span");
span.appendChild(document.createTextNode(text));
return span.innerHTML.replace(/\s/g, " ");
}