e-virt-table 1.3.2 → 1.3.3
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.
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Body.js +5 -2
- package/dist/lib/Body.js.map +1 -1
- package/dist/lib/Context.d.ts +1 -0
- package/dist/lib/Context.js +6 -0
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/Editor.js +2 -2
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/EventTable.js +0 -2
- package/dist/lib/EventTable.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3356,9 +3356,9 @@ class Le {
|
|
|
3356
3356
|
return;
|
|
3357
3357
|
const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i;
|
|
3358
3358
|
this.handleHeaderEvent(o, s, this.ctx.header.renderCellHeaders, (r) => {
|
|
3359
|
-
this.ctx.focusCellHeader = r, this.ctx.focusCell = void 0, this.ctx.emit("cellHeaderMousedown", r, t)
|
|
3359
|
+
this.ctx.focusCellHeader = r, this.ctx.focusCell = void 0, this.ctx.emit("cellHeaderMousedown", r, t);
|
|
3360
3360
|
}), this.handleBodyEvent(o, s, this.ctx.body.renderRows, (r) => {
|
|
3361
|
-
this.ctx.setFocusCell(r), this.ctx.focusCellHeader = void 0, this.ctx.emit("cellMousedown", r, t)
|
|
3361
|
+
this.ctx.setFocusCell(r), this.ctx.focusCellHeader = void 0, this.ctx.emit("cellMousedown", r, t);
|
|
3362
3362
|
});
|
|
3363
3363
|
}), this.ctx.on("mouseup", (t) => {
|
|
3364
3364
|
if (t.button !== 0 || this.isBusy(t))
|
|
@@ -3661,6 +3661,8 @@ class Me {
|
|
|
3661
3661
|
n(this, "isMouseoverTargetContainer", !1);
|
|
3662
3662
|
n(this, "mousedown", !1);
|
|
3663
3663
|
n(this, "isPointer", !1);
|
|
3664
|
+
n(this, "isEmpty", !1);
|
|
3665
|
+
// 是否空数据
|
|
3664
3666
|
n(this, "rowResizing", !1);
|
|
3665
3667
|
// 行调整大小中
|
|
3666
3668
|
n(this, "columnResizing", !1);
|
|
@@ -4643,7 +4645,7 @@ class Ne {
|
|
|
4643
4645
|
const { data: u, sumHeight: w } = s.getData();
|
|
4644
4646
|
this.height = w, this.data = u, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - r;
|
|
4645
4647
|
const m = this.ctx.footer.height;
|
|
4646
|
-
!this.data.length && !a ? this.height = l : !this.data.length && a && (this.height = a - e.height - m - r);
|
|
4648
|
+
this.ctx.isEmpty = !this.data.length, !this.data.length && !a ? this.height = l : !this.data.length && a && (this.height = a - e.height - m - r);
|
|
4647
4649
|
let g = this.height + e.height + r;
|
|
4648
4650
|
g += m;
|
|
4649
4651
|
let E = g;
|
|
@@ -4748,13 +4750,13 @@ class Ne {
|
|
|
4748
4750
|
stageWidth: o,
|
|
4749
4751
|
config: { HEADER_BG_COLOR: r, SCROLLER_TRACK_SIZE: a }
|
|
4750
4752
|
} = this.ctx;
|
|
4751
|
-
if (i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, this.y, t, this.height, {
|
|
4753
|
+
if (i > 0 && t !== 0 && !this.ctx.isEmpty && this.ctx.paint.drawShadow(this.x, this.y, t, this.height, {
|
|
4752
4754
|
fillColor: r,
|
|
4753
4755
|
side: "right",
|
|
4754
4756
|
shadowWidth: 4,
|
|
4755
4757
|
colorStart: "rgba(0,0,0,0.1)",
|
|
4756
4758
|
colorEnd: "rgba(0,0,0,0)"
|
|
4757
|
-
}), i < Math.floor(s.width - o - 1) && e !== a) {
|
|
4759
|
+
}), i < Math.floor(s.width - o - 1) && e !== a && !this.ctx.isEmpty) {
|
|
4758
4760
|
const l = s.width - (this.x + this.width) + o - e;
|
|
4759
4761
|
this.ctx.paint.drawShadow(l, this.y, e, this.height, {
|
|
4760
4762
|
fillColor: r,
|
|
@@ -6818,7 +6820,7 @@ class Oi {
|
|
|
6818
6820
|
if (a === "none")
|
|
6819
6821
|
return;
|
|
6820
6822
|
const l = this.ctx.database.getReadonly(o, r);
|
|
6821
|
-
i && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
|
|
6823
|
+
i && !l && (this.ctx.emit("drawView"), this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget));
|
|
6822
6824
|
}
|
|
6823
6825
|
editCell(t, e) {
|
|
6824
6826
|
const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
|