e-virt-table 0.1.17 → 0.1.18
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 +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -3
- 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/ContextMenu.d.ts +2 -2
- package/dist/lib/ContextMenu.js +4 -4
- package/dist/lib/ContextMenu.js.map +1 -1
- package/dist/lib/EVirtTable.d.ts +2 -0
- package/dist/lib/EVirtTable.js +6 -0
- package/dist/lib/EVirtTable.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5505,8 +5505,8 @@ class Ui {
|
|
|
5505
5505
|
constructor(t) {
|
|
5506
5506
|
l(this, "ctx");
|
|
5507
5507
|
l(this, "contextMenuEl");
|
|
5508
|
-
l(this, "
|
|
5509
|
-
this.ctx = t, this.ctx.contextMenuElement ? (this.
|
|
5508
|
+
l(this, "custom", !1);
|
|
5509
|
+
this.ctx = t, this.ctx.contextMenuElement ? (this.custom = !0, this.contextMenuEl = this.ctx.contextMenuElement) : (this.custom = !1, this.contextMenuEl = document.createElement("div")), this.createContextMenu(), this.init();
|
|
5510
5510
|
}
|
|
5511
5511
|
init() {
|
|
5512
5512
|
this.ctx.on("cellContextMenuClick", (t, e) => {
|
|
@@ -5537,7 +5537,7 @@ class Ui {
|
|
|
5537
5537
|
}
|
|
5538
5538
|
//创建右键菜单,绑定子项点击事件
|
|
5539
5539
|
createContextMenu() {
|
|
5540
|
-
if (this.contextMenuEl.className = "e-virt-table-context-menu", this.ctx.containerElement.appendChild(this.contextMenuEl), this.
|
|
5540
|
+
if (this.contextMenuEl.className = "e-virt-table-context-menu", this.ctx.containerElement.appendChild(this.contextMenuEl), this.custom) return;
|
|
5541
5541
|
const { CONTEXT_MENU: t } = this.ctx.config;
|
|
5542
5542
|
this.createContextMenuItems(t, (e) => {
|
|
5543
5543
|
switch (e.value) {
|
|
@@ -5654,6 +5654,9 @@ class Qi {
|
|
|
5654
5654
|
on(t, e) {
|
|
5655
5655
|
this.ctx.on(t, e);
|
|
5656
5656
|
}
|
|
5657
|
+
emit(t, ...e) {
|
|
5658
|
+
this.ctx.emit(t, ...e);
|
|
5659
|
+
}
|
|
5657
5660
|
off(t, e) {
|
|
5658
5661
|
this.ctx.off(t, e);
|
|
5659
5662
|
}
|
|
@@ -5791,6 +5794,9 @@ class Qi {
|
|
|
5791
5794
|
getCellValueByIndex(t, e) {
|
|
5792
5795
|
return this.ctx.database.getItemValueForRowIndexAndColIndex(t, e);
|
|
5793
5796
|
}
|
|
5797
|
+
contextMenuHide() {
|
|
5798
|
+
this.contextMenu.hide();
|
|
5799
|
+
}
|
|
5794
5800
|
/**
|
|
5795
5801
|
* 销毁
|
|
5796
5802
|
*/
|