Skip to content

Commit

Permalink
fix: 修复form flex模式下,往第一个元素上面拖拽添加异常问题
Browse files Browse the repository at this point in the history
  • Loading branch information
qkiroc committed Nov 29, 2024
1 parent 0ab0fce commit a56af11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/amis-editor-core/src/layout/flex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ export default class FlexLayout implements LayoutInterface {
if (position === 'right') {
row = preRow;
}
if (position === 'top') {
row = preRow + 1 || 0; // 如果往第一个元素上边插入,preRow为undefined,所以设置0
}

if (position === 'bottom' || position === 'top') {
if (position === 'bottom') {
row = preRow + 1;
}
}
Expand Down

0 comments on commit a56af11

Please sign in to comment.