venus-design 1.0.8 → 1.0.9

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,14 @@ 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 lastRow = rows[rows.length - 1];
448
+ var lastRowBottom = lastRow.y + lastRow.height;
448
449
  this.addRowBtnRect = {
449
450
  x: 0,
450
- y: dataBottom,
451
- // 即使 0 也要记录
451
+ y: lastRowBottom,
452
+ // 修正:用最后一行的底部
452
453
  w: this.width,
453
- h: this.ctx.config.CELL_HEIGHT // 始终一行高
454
+ h: this.ctx.config.CELL_HEIGHT
454
455
  };
455
456
  }
456
457
  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.9",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",