venus-design 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@ export var defaultConfig = {
18
18
  ENABLE_EDIT_SINGLE_CLICK: true,
19
19
  //单击进入编辑
20
20
  HEIGHT: 300,
21
- // 高度
21
+ // 高度
22
22
  ENABLE_KEYBOARD: true,
23
23
  // 开启键盘操作
24
24
  HIGHLIGHT_HOVER_ROW: true,
@@ -444,13 +444,16 @@ var Body = /*#__PURE__*/function () {
444
444
  rows.push(row);
445
445
  }
446
446
  if (this.ctx.config.ENABLE_ADD_ROW_BUTTON) {
447
- var dataBottom = this.height; // 当前数据总高(空时为 0)
447
+ var yPos = this.ctx.header.height; // 默认放在表头下方
448
+ if (rows.length > 0) {
449
+ var lastRow = rows[rows.length - 1];
450
+ yPos = lastRow.y + lastRow.height;
451
+ }
448
452
  this.addRowBtnRect = {
449
453
  x: 0,
450
- y: dataBottom,
451
- // 即使 0 也要记录
454
+ y: yPos,
452
455
  w: this.width,
453
- h: this.ctx.config.CELL_HEIGHT // 始终一行高
456
+ h: this.ctx.config.CELL_HEIGHT
454
457
  };
455
458
  }
456
459
  this.renderRows = rows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",