From deb3a965b881d747f9a2171f7d9c9f967d671901 Mon Sep 17 00:00:00 2001 From: jerry <654896146@qq.com> Date: Sat, 26 Dec 2020 01:05:28 +0800 Subject: [PATCH] fix(bug): bug --- src/global/getRowlen.js | 318 +++++++++++++++++++++------------------- 1 file changed, 164 insertions(+), 154 deletions(-) diff --git a/src/global/getRowlen.js b/src/global/getRowlen.js index 441ff49a9..6df06c340 100644 --- a/src/global/getRowlen.js +++ b/src/global/getRowlen.js @@ -893,187 +893,156 @@ function getCellTextInfo(cell , ctx, option){ } else{ value = value.toString(); - let splitValue = value.replace(/\r\n/g, "_x000D_").replace(/ /g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_"); - let splitArr = splitValue.split("_x000D_"); - for(let x=0, len=splitArr.length;xcellHeight && text_all_split[splitIndex]!=null && i!= value.length){ - // console.log("cut",anchor, i , str); - - if(spaceOrTwoByte!=null && spaceOrTwoByte.indexcellHeight && text_all_split[splitIndex]!=null && i!= value.length){ + // console.log("cut",anchor, i , str); - splitIndex +=1; + if(spaceOrTwoByte!=null && spaceOrTwoByte.indexcellWidth && text_all_split[splitIndex]!=null && i!= value.length){ - // console.log(spaceOrTwoByte, i, anchor); - if(spaceOrTwoByte!=null && spaceOrTwoByte.indexcellWidth && text_all_split[splitIndex]!=null && i!= value.length){ + // console.log(spaceOrTwoByte, i, anchor); + if(spaceOrTwoByte!=null && spaceOrTwoByte.index