From be1b65515fab0e9f376d64ef82d7e8cee2e4a8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Thu, 23 Dec 2021 16:13:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(server.js):=20=E4=BF=AE=E5=A4=8D=E5=8D=8F?= =?UTF-8?q?=E5=90=8C=E7=BC=96=E8=BE=91=E5=99=A8i=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=85=89=E6=A0=87=E5=9C=A8?= =?UTF-8?q?=E5=B7=A6=E4=B8=8A=E7=9A=84=E8=BE=B9=E6=8E=A5=E5=A4=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/server.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/controllers/server.js b/src/controllers/server.js index cf16ce9..acff9ca 100644 --- a/src/controllers/server.js +++ b/src/controllers/server.js @@ -989,17 +989,26 @@ const server = { col = margeset.column[1]; col_pre = margeset.column[0]; - } + } - // 超出16个字符就显示... - if(getByteLen(name) > 16){ - name = getByteLen(name,16) + "..."; - } + // *处理光标在靠左或者靠上顶着的时候,光标显示不全的问题 + if(col_pre <= 0){ + col_pre += 1 + } - // 如果正在编辑,就显示“正在输入” - if(value === 'enterEdit'){ - name += " " + locale().edit.typing; - } + if(row_pre <= 0){ + row_pre +=1 + } + + // 超出16个字符就显示... + if(getByteLen(name) > 16){ + name = getByteLen(name,16) + "..."; + } + + // 如果正在编辑,就显示“正在输入” + if(value === 'enterEdit'){ + name += " " + locale().edit.typing; + } if($("#luckysheet-multipleRange-show-" + id).length > 0){ $("#luckysheet-multipleRange-show-" + id).css({ "position": "absolute", "left": col_pre - 1, "width": col - col_pre - 1, "top": row_pre - 1, "height": row - row_pre - 1 });