diff --git a/packages/edit/src/mixin.js b/packages/edit/src/mixin.js index 90fbb3ab6ffda0d2b0f72d14ac7fafe2b567c6f6..21ff558f547ad8299e5c0fc5e8f1587fc0096308 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'))