e-virt-table 1.0.5 → 1.0.6
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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -12
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Body.js +3 -0
- package/dist/lib/Body.js.map +1 -1
- package/dist/lib/Cell.js +1 -1
- package/dist/lib/Cell.js.map +1 -1
- package/dist/lib/Context.js +1 -10
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/Database.js +1 -0
- package/dist/lib/Database.js.map +1 -1
- package/dist/lib/EventTable.js +1 -1
- package/dist/lib/EventTable.js.map +1 -1
- package/dist/lib/Scroller.d.ts +1 -1
- package/dist/lib/Scroller.js +9 -9
- package/dist/lib/Scroller.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1266,7 +1266,7 @@ class Tt extends se {
|
|
|
1266
1266
|
borderWidth: 1
|
|
1267
1267
|
});
|
|
1268
1268
|
const [n, h] = i, [c, d] = s;
|
|
1269
|
-
!(n === h && c === d) && this.colIndex >= n && this.colIndex <= h && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.
|
|
1269
|
+
!(n === h && c === d) && this.colIndex >= n && this.colIndex <= h && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
|
|
1270
1270
|
borderColor: "transparent",
|
|
1271
1271
|
fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
|
|
1272
1272
|
}), this.operation && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
|
|
@@ -1355,7 +1355,7 @@ class ni {
|
|
|
1355
1355
|
this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
|
|
1356
1356
|
}
|
|
1357
1357
|
init() {
|
|
1358
|
-
this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap(), this.initData(this.data);
|
|
1358
|
+
this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap(), this.initData(this.data), this.getData();
|
|
1359
1359
|
}
|
|
1360
1360
|
/**
|
|
1361
1361
|
* 清除缓存数据
|
|
@@ -2866,7 +2866,7 @@ class fi {
|
|
|
2866
2866
|
init() {
|
|
2867
2867
|
this.resizeObserver = new ResizeObserver(() => {
|
|
2868
2868
|
this.ctx.emit("resetHeader"), this.ctx.emit("resizeObserver");
|
|
2869
|
-
}), this.resizeObserver.observe(this.ctx.
|
|
2869
|
+
}), this.resizeObserver.observe(this.ctx.containerElement), this.ctx.on("mousedown", (t) => {
|
|
2870
2870
|
if (t.button !== 0 || this.isBusy(t))
|
|
2871
2871
|
return;
|
|
2872
2872
|
const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, r = i;
|
|
@@ -3141,7 +3141,7 @@ class xi {
|
|
|
3141
3141
|
} else
|
|
3142
3142
|
this.database.setItemValue(t, e, i, s, r, !0);
|
|
3143
3143
|
}
|
|
3144
|
-
batchSetItemValueByEditor(t, e) {
|
|
3144
|
+
batchSetItemValueByEditor(t, e = !0) {
|
|
3145
3145
|
if (this.config.ENABLE_MERGE_CELL_LINK) {
|
|
3146
3146
|
const i = [];
|
|
3147
3147
|
t.forEach((s) => {
|
|
@@ -3388,27 +3388,27 @@ class ui {
|
|
|
3388
3388
|
});
|
|
3389
3389
|
}
|
|
3390
3390
|
onWheel(t) {
|
|
3391
|
-
this.verticalScrollbar.onWheel(t), this.horizontalScrollbar.onWheel(t), this.draw();
|
|
3391
|
+
this.verticalScrollbar.onWheel(t), this.horizontalScrollbar.onWheel(t), this.draw(!0);
|
|
3392
3392
|
}
|
|
3393
3393
|
onTouchmove(t) {
|
|
3394
|
-
this.verticalScrollbar.onTouchmove(t), this.horizontalScrollbar.onTouchmove(t), this.draw();
|
|
3394
|
+
this.verticalScrollbar.onTouchmove(t), this.horizontalScrollbar.onTouchmove(t), this.draw(!0);
|
|
3395
3395
|
}
|
|
3396
3396
|
onTouchstart(t) {
|
|
3397
|
-
this.verticalScrollbar.onTouchstart(t), this.horizontalScrollbar.onTouchstart(t), this.draw();
|
|
3397
|
+
this.verticalScrollbar.onTouchstart(t), this.horizontalScrollbar.onTouchstart(t), this.draw(!0);
|
|
3398
3398
|
}
|
|
3399
3399
|
onMouseDown(t) {
|
|
3400
|
-
this.verticalScrollbar.onMouseDown(t), this.horizontalScrollbar.onMouseDown(t), this.draw();
|
|
3400
|
+
this.verticalScrollbar.onMouseDown(t), this.horizontalScrollbar.onMouseDown(t), this.draw(!0);
|
|
3401
3401
|
}
|
|
3402
3402
|
onMouseMove(t) {
|
|
3403
|
-
this.verticalScrollbar.onMouseMove(t), this.horizontalScrollbar.onMouseMove(t), this.draw();
|
|
3403
|
+
this.verticalScrollbar.onMouseMove(t), this.horizontalScrollbar.onMouseMove(t), this.draw(!0);
|
|
3404
3404
|
}
|
|
3405
3405
|
onMouseUp() {
|
|
3406
3406
|
this.verticalScrollbar.onMouseUp(), this.horizontalScrollbar.onMouseUp(), this.ctx.scrollerMove = !1;
|
|
3407
3407
|
}
|
|
3408
|
-
draw() {
|
|
3408
|
+
draw(t = !1) {
|
|
3409
3409
|
this.verticalScrollbar.draw(), this.horizontalScrollbar.draw();
|
|
3410
|
-
const
|
|
3411
|
-
(
|
|
3410
|
+
const e = Math.floor(this.horizontalScrollbar.scroll), i = Math.floor(this.verticalScrollbar.scroll);
|
|
3411
|
+
(e !== this.ctx.scrollX || i !== this.ctx.scrollY) && (this.ctx.emit("onScroll", e, i, t), e !== this.ctx.scrollX && this.ctx.emit("onScrollX", e, t), i !== this.ctx.scrollY && this.ctx.emit("onScrollY", i, t), this.ctx.scrollX = e, this.ctx.scrollY = i, this.ctx.emit("draw"));
|
|
3412
3412
|
}
|
|
3413
3413
|
setScroll(t, e) {
|
|
3414
3414
|
this.horizontalScrollbar.scroll = t, this.verticalScrollbar.scroll = e, this.ctx.emit("draw");
|
|
@@ -3875,6 +3875,8 @@ class wi {
|
|
|
3875
3875
|
const { header: t, database: e, scrollY: i } = this.ctx, s = i, { data: r, positions: o } = e.getData();
|
|
3876
3876
|
this.ctx.maxRowIndex = r.length - 1;
|
|
3877
3877
|
const n = this.binarySearch(o, s);
|
|
3878
|
+
if (n === -1)
|
|
3879
|
+
return;
|
|
3878
3880
|
let h = this.binarySearch(o, s + this.visibleHeight);
|
|
3879
3881
|
h === -1 && (h = r.length), this.headIndex = Math.max(0, n), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
|
|
3880
3882
|
const c = [];
|