소스 검색

海报标题去除换行符

lifuxiong 4 년 전
부모
커밋
5c134fd8a2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      utils/poster.js

+ 1 - 1
utils/poster.js

@@ -89,7 +89,7 @@ export default class Poster {
           case "content":
             canvasObj.views.push({
               type: "text",
-              text: what,
+              text: what.replace(/[\r\n]/g, ""),
               css: {
                 left: `${left}px`,
                 top: `${top}px`,