Kaynağa Gözat

修复复制excel内容后单元格没有自动换行

xjj 2 yıl önce
ebeveyn
işleme
dbd481fb7c
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      src/global/format.js

+ 5 - 0
src/global/format.js

@@ -1790,6 +1790,11 @@ export function genarate(value) {//万 单位格式增加!!!
         ct = { "fa": "General", "t": "b" };
         v = false;
     }
+    else if(/\n/.test(value)){
+        m = value.toString();
+        v = m;
+        ct = { "fa": "@" ,t: "inlineStr", s: [{v: m.replace(/(?<!\r)\n/g, '\r\n')}]  }
+    }
     else if(valueIsError(value)){
         m = value.toString();
         ct = { "fa": "General", "t": "e" };