From bab6b8253720e1cddddfababc718b5839d5b56ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B6=8A?= <7586813+lydadada@user.noreply.gitee.com> Date: Mon, 23 Oct 2023 07:03:29 +0000 Subject: [PATCH] =?UTF-8?q?update=20packages/edit/src/mixin.js.=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8max=E4=B8=80=E7=9B=B4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=88=B0=E5=BD=93=E5=89=8D=E8=A1=8C=E6=95=B0=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4insertNextAt=20=E4=B8=80=E7=9B=B4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E5=90=8E=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李越 <7586813+lydadada@user.noreply.gitee.com> --- packages/edit/src/mixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit/src/mixin.js b/packages/edit/src/mixin.js index 90fbb3ab6..21ff558f5 100644 --- a/packages/edit/src/mixin.js +++ b/packages/edit/src/mixin.js @@ -149,7 +149,7 @@ function handleInsertRowAt (_vm, records, row, isInsertNextRow) { } // 如果是插入指定行的下一行 if (isInsertNextRow) { - afIndex = Math.max(afterFullData.length, afIndex + 1) + afIndex = Math.min(afterFullData.length, afIndex + 1) } if (afIndex === -1) { throw new Error(errLog('vxe.error.unableInsert')) -- Gitee