vxe-table 4.23.8 → 4.23.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.
- package/dist/all.esm.js +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
package/lib/grid/src/grid.js
CHANGED
|
@@ -48,7 +48,191 @@ var import_toolbar = __toESM(require("../../toolbar"));
|
|
|
48
48
|
const { warnLog, errLog } = (0, import_log.createComponentLog)("grid");
|
|
49
49
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = import_core.VxeUI;
|
|
50
50
|
const tableComponentPropKeys = Object.keys(import_props2.tableProps);
|
|
51
|
-
const tableComponentMethodKeys = [
|
|
51
|
+
const tableComponentMethodKeys = [
|
|
52
|
+
"clearAll",
|
|
53
|
+
"syncData",
|
|
54
|
+
"updateData",
|
|
55
|
+
"loadData",
|
|
56
|
+
"reloadData",
|
|
57
|
+
"reloadRow",
|
|
58
|
+
"loadColumn",
|
|
59
|
+
"reloadColumn",
|
|
60
|
+
"getRowNode",
|
|
61
|
+
"getColumnNode",
|
|
62
|
+
"getRowIndex",
|
|
63
|
+
"getVTRowIndex",
|
|
64
|
+
"getVMRowIndex",
|
|
65
|
+
"getColumnIndex",
|
|
66
|
+
"getVTColumnIndex",
|
|
67
|
+
"getVMColumnIndex",
|
|
68
|
+
"setRow",
|
|
69
|
+
"createData",
|
|
70
|
+
"createRow",
|
|
71
|
+
"revertData",
|
|
72
|
+
"clearData",
|
|
73
|
+
"isRemoveByRow",
|
|
74
|
+
"isInsertByRow",
|
|
75
|
+
"isUpdateByRow",
|
|
76
|
+
"getColumns",
|
|
77
|
+
"getColumnById",
|
|
78
|
+
"getColumnByField",
|
|
79
|
+
"getTableColumn",
|
|
80
|
+
"getFullColumns",
|
|
81
|
+
"getData",
|
|
82
|
+
"getCheckboxRecords",
|
|
83
|
+
"getParentRow",
|
|
84
|
+
"getTreeRowChildren",
|
|
85
|
+
"getTreeRowLevel",
|
|
86
|
+
"getTreeParentRow",
|
|
87
|
+
"getRowSeq",
|
|
88
|
+
"getRowById",
|
|
89
|
+
"getRowid",
|
|
90
|
+
"getTableData",
|
|
91
|
+
"getFullData",
|
|
92
|
+
"setColumnFixed",
|
|
93
|
+
"clearColumnFixed",
|
|
94
|
+
"setColumnWidth",
|
|
95
|
+
"getColumnWidth",
|
|
96
|
+
"recalcRowHeight",
|
|
97
|
+
"setRowHeightConf",
|
|
98
|
+
"getRowHeightConf",
|
|
99
|
+
"setRowHeight",
|
|
100
|
+
"getRowHeight",
|
|
101
|
+
"hideColumn",
|
|
102
|
+
"showColumn",
|
|
103
|
+
"resetColumn",
|
|
104
|
+
"refreshColumn",
|
|
105
|
+
"refreshScroll",
|
|
106
|
+
"recalculate",
|
|
107
|
+
"closeTooltip",
|
|
108
|
+
"isAllCheckboxChecked",
|
|
109
|
+
"isAllCheckboxIndeterminate",
|
|
110
|
+
"getCheckboxIndeterminateRecords",
|
|
111
|
+
"setCheckboxRow",
|
|
112
|
+
"setCheckboxRowKey",
|
|
113
|
+
"isCheckedByCheckboxRow",
|
|
114
|
+
"isCheckedByCheckboxRowKey",
|
|
115
|
+
"isIndeterminateByCheckboxRow",
|
|
116
|
+
"isIndeterminateByCheckboxRowKey",
|
|
117
|
+
"toggleCheckboxRow",
|
|
118
|
+
"setAllCheckboxRow",
|
|
119
|
+
"getRadioReserveRecord",
|
|
120
|
+
"clearRadioReserve",
|
|
121
|
+
"getCheckboxReserveRecords",
|
|
122
|
+
"clearCheckboxReserve",
|
|
123
|
+
"toggleAllCheckboxRow",
|
|
124
|
+
"clearCheckboxRow",
|
|
125
|
+
"setCurrentRow",
|
|
126
|
+
"isCheckedByRadioRow",
|
|
127
|
+
"isCheckedByRadioRowKey",
|
|
128
|
+
"setRadioRow",
|
|
129
|
+
"setRadioRowKey",
|
|
130
|
+
"clearCurrentRow",
|
|
131
|
+
"clearRadioRow",
|
|
132
|
+
"getCurrentRecord",
|
|
133
|
+
"getRadioRecord",
|
|
134
|
+
"getCurrentColumn",
|
|
135
|
+
"setCurrentColumn",
|
|
136
|
+
"clearCurrentColumn",
|
|
137
|
+
"setPendingRow",
|
|
138
|
+
"togglePendingRow",
|
|
139
|
+
"hasPendingByRow",
|
|
140
|
+
"isPendingByRow",
|
|
141
|
+
"getPendingRecords",
|
|
142
|
+
"clearPendingRow",
|
|
143
|
+
"setFilterByEvent",
|
|
144
|
+
"sort",
|
|
145
|
+
"setSort",
|
|
146
|
+
"setSortByEvent",
|
|
147
|
+
"clearSort",
|
|
148
|
+
"clearSortByEvent",
|
|
149
|
+
"isSort",
|
|
150
|
+
"getSortColumns",
|
|
151
|
+
"closeFilter",
|
|
152
|
+
"isFilter",
|
|
153
|
+
"clearFilterByEvent",
|
|
154
|
+
"isActiveFilterByColumn",
|
|
155
|
+
"isRowExpandLoaded",
|
|
156
|
+
"clearRowExpandLoaded",
|
|
157
|
+
"reloadRowExpand",
|
|
158
|
+
"reloadRowExpand",
|
|
159
|
+
"toggleRowExpand",
|
|
160
|
+
"setAllRowExpand",
|
|
161
|
+
"setRowExpand",
|
|
162
|
+
"isExpandByRow",
|
|
163
|
+
"isRowExpandByRow",
|
|
164
|
+
"clearRowExpand",
|
|
165
|
+
"clearRowExpandReserve",
|
|
166
|
+
"getRowExpandRecords",
|
|
167
|
+
"getTreeExpandRecords",
|
|
168
|
+
"isTreeExpandLoaded",
|
|
169
|
+
"clearTreeExpandLoaded",
|
|
170
|
+
"reloadTreeExpand",
|
|
171
|
+
"reloadTreeChilds",
|
|
172
|
+
"toggleTreeExpand",
|
|
173
|
+
"setAllTreeExpand",
|
|
174
|
+
"setTreeExpand",
|
|
175
|
+
"isTreeExpandByRow",
|
|
176
|
+
"clearTreeExpand",
|
|
177
|
+
"clearTreeExpandReserve",
|
|
178
|
+
"getScroll",
|
|
179
|
+
"getScrollData",
|
|
180
|
+
"scrollTo",
|
|
181
|
+
"scrollToStartRow",
|
|
182
|
+
"scrollToEndRow",
|
|
183
|
+
"scrollToRow",
|
|
184
|
+
"scrollToStartColumn",
|
|
185
|
+
"scrollToEndColumn",
|
|
186
|
+
"scrollToColumn",
|
|
187
|
+
"clearScroll",
|
|
188
|
+
"updateFooter",
|
|
189
|
+
"updateStatus",
|
|
190
|
+
"setMergeCells",
|
|
191
|
+
"removeInsertRow",
|
|
192
|
+
"removeMergeCells",
|
|
193
|
+
"getMergeCells",
|
|
194
|
+
"setMergeHeaderCells",
|
|
195
|
+
"removeMergeHeaderCells",
|
|
196
|
+
"getMergeHeaderCells",
|
|
197
|
+
"clearMergeHeaderCells",
|
|
198
|
+
"clearMergeCells",
|
|
199
|
+
"setMergeFooterItems",
|
|
200
|
+
"removeMergeFooterItems",
|
|
201
|
+
"getMergeFooterItems",
|
|
202
|
+
"clearMergeFooterItems",
|
|
203
|
+
"setCustomStoreData",
|
|
204
|
+
"getCustomStoreData",
|
|
205
|
+
"setRowGroupExpand",
|
|
206
|
+
"setRowGroupExpandByField",
|
|
207
|
+
"setAllRowGroupExpand",
|
|
208
|
+
"clearRowGroupExpand",
|
|
209
|
+
"isRowGroupExpandByRow",
|
|
210
|
+
"isRowGroupRecord",
|
|
211
|
+
"isAggregateRecord",
|
|
212
|
+
"isAggregateExpandByRow",
|
|
213
|
+
"getAggregateContentByRow",
|
|
214
|
+
"getAggregateRowChildren",
|
|
215
|
+
"setRowGroups",
|
|
216
|
+
"clearRowGroups",
|
|
217
|
+
"openTooltip",
|
|
218
|
+
"moveColumnTo",
|
|
219
|
+
"moveRowTo",
|
|
220
|
+
"getCellLabel",
|
|
221
|
+
"updateCellLabel",
|
|
222
|
+
"clearFormatterCache",
|
|
223
|
+
"getFooterCellLabel",
|
|
224
|
+
"updateFooterCellLabel",
|
|
225
|
+
"clearFooterFormatterCache",
|
|
226
|
+
"getUpdateCells",
|
|
227
|
+
"undo",
|
|
228
|
+
"redo",
|
|
229
|
+
"effectCellData",
|
|
230
|
+
"getCellElement",
|
|
231
|
+
"focus",
|
|
232
|
+
"blur",
|
|
233
|
+
"connect",
|
|
234
|
+
"connectToolbar"
|
|
235
|
+
];
|
|
52
236
|
function createReactData() {
|
|
53
237
|
var _a;
|
|
54
238
|
return {
|
|
@@ -548,6 +732,7 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
548
732
|
if (formOpts.items) {
|
|
549
733
|
const formSlots = {};
|
|
550
734
|
if (!formOpts.inited) {
|
|
735
|
+
;
|
|
551
736
|
formOpts.inited = true;
|
|
552
737
|
const beforeItem = proxyOpts.beforeItem;
|
|
553
738
|
if (proxyOpts && beforeItem) {
|
|
@@ -567,25 +752,33 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
567
752
|
});
|
|
568
753
|
if (VxeUIFormComponent) {
|
|
569
754
|
slotVNs.push(
|
|
570
|
-
(0, import_vue.h)(
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
755
|
+
(0, import_vue.h)(
|
|
756
|
+
VxeUIFormComponent,
|
|
757
|
+
{
|
|
758
|
+
ref: refForm,
|
|
759
|
+
...Object.assign({}, formOpts, {
|
|
760
|
+
data: proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) && proxyOpts.form ? formData : formOpts.data
|
|
761
|
+
}),
|
|
762
|
+
onSubmit: submitFormEvent,
|
|
763
|
+
onReset: resetFormEvent,
|
|
764
|
+
onSubmitInvalid: submitInvalidEvent,
|
|
765
|
+
onCollapse: collapseEvent
|
|
766
|
+
},
|
|
767
|
+
formSlots
|
|
768
|
+
)
|
|
580
769
|
);
|
|
581
770
|
}
|
|
582
771
|
}
|
|
583
772
|
}
|
|
584
|
-
return (0, import_vue.h)(
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
773
|
+
return (0, import_vue.h)(
|
|
774
|
+
"div",
|
|
775
|
+
{
|
|
776
|
+
ref: refFormWrapper,
|
|
777
|
+
key: "form",
|
|
778
|
+
class: "vxe-grid--form-wrapper"
|
|
779
|
+
},
|
|
780
|
+
slotVNs
|
|
781
|
+
);
|
|
589
782
|
}
|
|
590
783
|
return renderEmptyElement($xeGrid);
|
|
591
784
|
};
|
|
@@ -627,47 +820,67 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
627
820
|
}
|
|
628
821
|
}
|
|
629
822
|
slotVNs.push(
|
|
630
|
-
(0, import_vue.h)(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
823
|
+
(0, import_vue.h)(
|
|
824
|
+
import_toolbar.default,
|
|
825
|
+
{
|
|
826
|
+
ref: refToolbar,
|
|
827
|
+
...toolbarOpts,
|
|
828
|
+
slots: void 0
|
|
829
|
+
},
|
|
830
|
+
toolbarSlots
|
|
831
|
+
)
|
|
635
832
|
);
|
|
636
833
|
}
|
|
637
|
-
return (0, import_vue.h)(
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
834
|
+
return (0, import_vue.h)(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
ref: refToolbarWrapper,
|
|
838
|
+
key: "toolbar",
|
|
839
|
+
class: "vxe-grid--toolbar-wrapper"
|
|
840
|
+
},
|
|
841
|
+
slotVNs
|
|
842
|
+
);
|
|
642
843
|
}
|
|
643
844
|
return renderEmptyElement($xeGrid);
|
|
644
845
|
};
|
|
645
846
|
const renderTop = () => {
|
|
646
847
|
const topSlot = slots.top;
|
|
647
848
|
if (topSlot) {
|
|
648
|
-
return (0, import_vue.h)(
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
849
|
+
return (0, import_vue.h)(
|
|
850
|
+
"div",
|
|
851
|
+
{
|
|
852
|
+
ref: refTopWrapper,
|
|
853
|
+
key: "top",
|
|
854
|
+
class: "vxe-grid--top-wrapper"
|
|
855
|
+
},
|
|
856
|
+
topSlot({ $grid: $xeGrid, $gantt: null })
|
|
857
|
+
);
|
|
653
858
|
}
|
|
654
859
|
return renderEmptyElement($xeGrid);
|
|
655
860
|
};
|
|
656
861
|
const renderTableLeft = () => {
|
|
657
862
|
const leftSlot = slots.left;
|
|
658
863
|
if (leftSlot) {
|
|
659
|
-
return (0, import_vue.h)(
|
|
660
|
-
|
|
661
|
-
|
|
864
|
+
return (0, import_vue.h)(
|
|
865
|
+
"div",
|
|
866
|
+
{
|
|
867
|
+
class: "vxe-grid--left-wrapper"
|
|
868
|
+
},
|
|
869
|
+
leftSlot({ $grid: $xeGrid, $gantt: null })
|
|
870
|
+
);
|
|
662
871
|
}
|
|
663
872
|
return renderEmptyElement($xeGrid);
|
|
664
873
|
};
|
|
665
874
|
const renderTableRight = () => {
|
|
666
875
|
const rightSlot = slots.right;
|
|
667
876
|
if (rightSlot) {
|
|
668
|
-
return (0, import_vue.h)(
|
|
669
|
-
|
|
670
|
-
|
|
877
|
+
return (0, import_vue.h)(
|
|
878
|
+
"div",
|
|
879
|
+
{
|
|
880
|
+
class: "vxe-grid--right-wrapper"
|
|
881
|
+
},
|
|
882
|
+
rightSlot({ $grid: $xeGrid, $gantt: null })
|
|
883
|
+
);
|
|
671
884
|
}
|
|
672
885
|
return renderEmptyElement($xeGrid);
|
|
673
886
|
};
|
|
@@ -715,23 +928,35 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
715
928
|
if (footerTooltipSlot) {
|
|
716
929
|
slotObj.footerTooltip = footerTooltipSlot;
|
|
717
930
|
}
|
|
718
|
-
return (0, import_vue.h)(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
931
|
+
return (0, import_vue.h)(
|
|
932
|
+
"div",
|
|
933
|
+
{
|
|
934
|
+
class: "vxe-grid--table-wrapper"
|
|
935
|
+
},
|
|
936
|
+
[
|
|
937
|
+
(0, import_vue.h)(
|
|
938
|
+
import_table.default,
|
|
939
|
+
{
|
|
940
|
+
ref: refTable,
|
|
941
|
+
...tableProps2,
|
|
942
|
+
...tableOns
|
|
943
|
+
},
|
|
944
|
+
slotObj
|
|
945
|
+
)
|
|
946
|
+
]
|
|
947
|
+
);
|
|
727
948
|
};
|
|
728
949
|
const renderBottom = () => {
|
|
729
950
|
if (slots.bottom) {
|
|
730
|
-
return (0, import_vue.h)(
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
951
|
+
return (0, import_vue.h)(
|
|
952
|
+
"div",
|
|
953
|
+
{
|
|
954
|
+
ref: refBottomWrapper,
|
|
955
|
+
key: "bottom",
|
|
956
|
+
class: "vxe-grid--bottom-wrapper"
|
|
957
|
+
},
|
|
958
|
+
slots.bottom({ $grid: $xeGrid, $gantt: null })
|
|
959
|
+
);
|
|
735
960
|
}
|
|
736
961
|
return renderEmptyElement($xeGrid);
|
|
737
962
|
};
|
|
@@ -742,18 +967,26 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
742
967
|
const pagerProps = computePagerProps.value;
|
|
743
968
|
const pagerSlot = slots.pager;
|
|
744
969
|
if (pagerConfig && (0, import_utils.isEnableConf)(pagerOpts) || slots.pager) {
|
|
745
|
-
return (0, import_vue.h)(
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
970
|
+
return (0, import_vue.h)(
|
|
971
|
+
"div",
|
|
972
|
+
{
|
|
973
|
+
ref: refPagerWrapper,
|
|
974
|
+
key: "pager",
|
|
975
|
+
class: "vxe-grid--pager-wrapper"
|
|
976
|
+
},
|
|
977
|
+
pagerSlot ? pagerSlot({ $grid: $xeGrid, $gantt: null }) : [
|
|
978
|
+
VxeUIPagerComponent ? (0, import_vue.h)(
|
|
979
|
+
VxeUIPagerComponent,
|
|
980
|
+
{
|
|
981
|
+
ref: refPager,
|
|
982
|
+
...pagerProps,
|
|
983
|
+
...proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) ? reactData.tablePage : {},
|
|
984
|
+
onPageChange: pageChangeEvent
|
|
985
|
+
},
|
|
986
|
+
getConfigSlot(pagerOpts.slots)
|
|
987
|
+
) : renderEmptyElement($xeGrid)
|
|
988
|
+
]
|
|
989
|
+
);
|
|
757
990
|
}
|
|
758
991
|
return renderEmptyElement($xeGrid);
|
|
759
992
|
};
|
|
@@ -772,14 +1005,14 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
772
1005
|
break;
|
|
773
1006
|
case "Table":
|
|
774
1007
|
childVNs.push(
|
|
775
|
-
(0, import_vue.h)(
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
renderTableRight()
|
|
782
|
-
|
|
1008
|
+
(0, import_vue.h)(
|
|
1009
|
+
"div",
|
|
1010
|
+
{
|
|
1011
|
+
key: "table",
|
|
1012
|
+
class: "vxe-grid--table-container"
|
|
1013
|
+
},
|
|
1014
|
+
[renderTableLeft(), renderTable(), renderTableRight()]
|
|
1015
|
+
)
|
|
783
1016
|
);
|
|
784
1017
|
break;
|
|
785
1018
|
case "Bottom":
|
|
@@ -801,25 +1034,49 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
801
1034
|
const asideLeftSlot = slots.asideLeft || slots["aside-left"];
|
|
802
1035
|
const asideRightSlot = slots.asideRight || slots["aside-right"];
|
|
803
1036
|
return [
|
|
804
|
-
(0, import_vue.h)(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
class: "vxe-grid--layout-body-
|
|
815
|
-
},
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1037
|
+
(0, import_vue.h)(
|
|
1038
|
+
"div",
|
|
1039
|
+
{
|
|
1040
|
+
class: "vxe-grid--layout-header-wrapper"
|
|
1041
|
+
},
|
|
1042
|
+
renderChildLayout(headKeys)
|
|
1043
|
+
),
|
|
1044
|
+
(0, import_vue.h)(
|
|
1045
|
+
"div",
|
|
1046
|
+
{
|
|
1047
|
+
class: "vxe-grid--layout-body-wrapper"
|
|
1048
|
+
},
|
|
1049
|
+
[
|
|
1050
|
+
asideLeftSlot ? (0, import_vue.h)(
|
|
1051
|
+
"div",
|
|
1052
|
+
{
|
|
1053
|
+
class: "vxe-grid--layout-aside-left-wrapper"
|
|
1054
|
+
},
|
|
1055
|
+
asideLeftSlot({})
|
|
1056
|
+
) : renderEmptyElement($xeGrid),
|
|
1057
|
+
(0, import_vue.h)(
|
|
1058
|
+
"div",
|
|
1059
|
+
{
|
|
1060
|
+
class: "vxe-grid--layout-body-content-wrapper"
|
|
1061
|
+
},
|
|
1062
|
+
renderChildLayout(bodyKeys)
|
|
1063
|
+
),
|
|
1064
|
+
asideRightSlot ? (0, import_vue.h)(
|
|
1065
|
+
"div",
|
|
1066
|
+
{
|
|
1067
|
+
class: "vxe-grid--layout-aside-right-wrapper"
|
|
1068
|
+
},
|
|
1069
|
+
asideRightSlot({})
|
|
1070
|
+
) : renderEmptyElement($xeGrid)
|
|
1071
|
+
]
|
|
1072
|
+
),
|
|
1073
|
+
(0, import_vue.h)(
|
|
1074
|
+
"div",
|
|
1075
|
+
{
|
|
1076
|
+
class: "vxe-grid--layout-footer-wrapper"
|
|
1077
|
+
},
|
|
1078
|
+
renderChildLayout(footKeys)
|
|
1079
|
+
),
|
|
823
1080
|
(0, import_vue.h)("div", {
|
|
824
1081
|
ref: refPopupContainerElem
|
|
825
1082
|
})
|
|
@@ -1054,10 +1311,7 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
1054
1311
|
reactData.sortData = sortList;
|
|
1055
1312
|
reactData.filterData = filterList;
|
|
1056
1313
|
reactData.tableLoading = true;
|
|
1057
|
-
return Promise.all([
|
|
1058
|
-
Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)),
|
|
1059
|
-
operPromise
|
|
1060
|
-
]).then(([rest]) => {
|
|
1314
|
+
return Promise.all([Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)), operPromise]).then(([rest]) => {
|
|
1061
1315
|
reactData.tableLoading = false;
|
|
1062
1316
|
if (aqMethod) {
|
|
1063
1317
|
aqMethod({ ...commitParams, response: rest, status: "success" }, ...args);
|
|
@@ -1428,9 +1682,13 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
1428
1682
|
const { formConfig } = props;
|
|
1429
1683
|
const { items } = formOpts;
|
|
1430
1684
|
const itemList = [];
|
|
1431
|
-
import_xe_utils.default.eachTree(
|
|
1432
|
-
|
|
1433
|
-
|
|
1685
|
+
import_xe_utils.default.eachTree(
|
|
1686
|
+
formConfig && (0, import_utils.isEnableConf)(formOpts) && items ? items : [],
|
|
1687
|
+
(item) => {
|
|
1688
|
+
itemList.push(item);
|
|
1689
|
+
},
|
|
1690
|
+
{ children: "children" }
|
|
1691
|
+
);
|
|
1434
1692
|
return import_xe_utils.default.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
|
|
1435
1693
|
},
|
|
1436
1694
|
getFormFlatItems() {
|
|
@@ -1698,31 +1956,47 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
1698
1956
|
const vSize = computeSize.value;
|
|
1699
1957
|
const styles = computeStyles.value;
|
|
1700
1958
|
const isLoading = computeIsLoading.value;
|
|
1701
|
-
return (0, import_vue.h)(
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1959
|
+
return (0, import_vue.h)(
|
|
1960
|
+
"div",
|
|
1961
|
+
{
|
|
1962
|
+
ref: refElem,
|
|
1963
|
+
class: [
|
|
1964
|
+
"vxe-grid",
|
|
1965
|
+
{
|
|
1966
|
+
[`size--${vSize}`]: vSize,
|
|
1967
|
+
"is--animat": !!props.animat,
|
|
1968
|
+
"is--round": props.round,
|
|
1969
|
+
"is--maximize": reactData.isZMax,
|
|
1970
|
+
"is--loading": isLoading
|
|
1971
|
+
}
|
|
1972
|
+
],
|
|
1973
|
+
style: styles
|
|
1974
|
+
},
|
|
1975
|
+
renderLayout()
|
|
1976
|
+
);
|
|
1712
1977
|
};
|
|
1713
1978
|
const columnFlag = (0, import_vue.ref)(0);
|
|
1714
|
-
(0, import_vue.watch)(
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1979
|
+
(0, import_vue.watch)(
|
|
1980
|
+
() => props.columns ? props.columns.length : -1,
|
|
1981
|
+
() => {
|
|
1982
|
+
columnFlag.value++;
|
|
1983
|
+
}
|
|
1984
|
+
);
|
|
1985
|
+
(0, import_vue.watch)(
|
|
1986
|
+
() => props.columns,
|
|
1987
|
+
() => {
|
|
1988
|
+
columnFlag.value++;
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1720
1991
|
(0, import_vue.watch)(columnFlag, () => {
|
|
1721
1992
|
(0, import_vue.nextTick)(() => $xeGrid.loadColumn(props.columns || []));
|
|
1722
1993
|
});
|
|
1723
|
-
(0, import_vue.watch)(
|
|
1724
|
-
|
|
1725
|
-
|
|
1994
|
+
(0, import_vue.watch)(
|
|
1995
|
+
() => props.toolbarConfig,
|
|
1996
|
+
() => {
|
|
1997
|
+
initToolbar();
|
|
1998
|
+
}
|
|
1999
|
+
);
|
|
1726
2000
|
(0, import_vue.watch)(computeCustomCurrentPageFlag, () => {
|
|
1727
2001
|
initPages("currentPage");
|
|
1728
2002
|
});
|
|
@@ -1732,9 +2006,12 @@ var grid_default = (0, import_comp.defineVxeComponent)({
|
|
|
1732
2006
|
(0, import_vue.watch)(computeCustomTotalFlag, () => {
|
|
1733
2007
|
initPages("total");
|
|
1734
2008
|
});
|
|
1735
|
-
(0, import_vue.watch)(
|
|
1736
|
-
|
|
1737
|
-
|
|
2009
|
+
(0, import_vue.watch)(
|
|
2010
|
+
() => props.proxyConfig,
|
|
2011
|
+
() => {
|
|
2012
|
+
initProxy();
|
|
2013
|
+
}
|
|
2014
|
+
);
|
|
1738
2015
|
hooks.forEach((options) => {
|
|
1739
2016
|
const { setupGrid } = options;
|
|
1740
2017
|
if (setupGrid) {
|
package/lib/index.common.js
CHANGED
|
@@ -36,6 +36,7 @@ var VxeUITableExport = __toESM(require("./components"));
|
|
|
36
36
|
__reExport(index_exports, require("./components"), module.exports);
|
|
37
37
|
if (typeof window !== "undefined" && window.Vue) {
|
|
38
38
|
if (!window.VXETable) {
|
|
39
|
+
;
|
|
39
40
|
window.VXETable = VxeUITableExport;
|
|
40
41
|
}
|
|
41
42
|
}
|
package/lib/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var VxeUITableExport = __toESM(require("./components"));
|
|
|
36
36
|
__reExport(index_exports, require("./components"), module.exports);
|
|
37
37
|
if (typeof window !== "undefined" && window.Vue) {
|
|
38
38
|
if (!window.VXETable) {
|
|
39
|
+
;
|
|
39
40
|
window.VXETable = VxeUITableExport;
|
|
40
41
|
}
|
|
41
42
|
}
|