浏览代码

海报标题去除换行符

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`,