vxe-table 4.23.7 → 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 +5859 -4018
- package/es/colgroup/index.js +1 -1
- package/es/column/index.js +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +4 -8
- package/es/grid/index.js +1 -1
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +398 -121
- package/es/grid/src/props.js +1 -1
- package/es/index.esm.js +6 -0
- package/es/index.js +6 -0
- package/es/table/index.js +1 -1
- package/es/table/module/custom/hook.js +50 -43
- package/es/table/module/custom/panel.js +778 -528
- package/es/table/module/edit/hook.js +141 -63
- package/es/table/module/export/export-panel.js +400 -317
- package/es/table/module/export/hook.js +396 -338
- package/es/table/module/export/import-panel.js +153 -124
- package/es/table/module/filter/hook.js +17 -3
- package/es/table/module/filter/panel.js +147 -85
- package/es/table/module/keyboard/hook.js +9 -5
- package/es/table/module/menu/hook.js +1 -1
- package/es/table/module/menu/panel.js +198 -127
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/render/index.js +152 -99
- package/es/table/src/body.js +356 -234
- package/es/table/src/cell.js +427 -270
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/footer.js +145 -100
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +230 -173
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +1504 -1031
- package/es/table/src/util.js +15 -19
- package/es/toolbar/index.js +1 -1
- package/es/toolbar/src/toolbar.js +133 -76
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +1 -2
- 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/es/v-x-e-table/index.d.ts +0 -1
- package/es/v-x-e-table/index.js +0 -1
- package/lib/colgroup/index.js +5 -5
- package/lib/column/index.js +5 -5
- package/lib/components.js +8 -12
- package/lib/grid/index.js +4 -4
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +419 -142
- package/lib/grid/src/props.js +2 -2
- package/lib/index.common.js +6 -0
- package/lib/index.js +6 -0
- package/lib/index.umd.js +5825 -3945
- package/lib/index.umd.min.js +3 -3
- package/lib/table/index.js +5 -5
- package/lib/table/module/custom/hook.js +51 -44
- package/lib/table/module/custom/panel.js +790 -540
- package/lib/table/module/edit/hook.js +142 -64
- package/lib/table/module/export/export-panel.js +406 -323
- package/lib/table/module/export/hook.js +419 -361
- package/lib/table/module/export/import-panel.js +157 -128
- package/lib/table/module/filter/hook.js +18 -4
- package/lib/table/module/filter/panel.js +149 -87
- package/lib/table/module/keyboard/hook.js +10 -6
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/panel.js +199 -128
- package/lib/table/module/validator/hook.js +2 -2
- package/lib/table/render/index.js +153 -100
- package/lib/table/src/body.js +357 -235
- package/lib/table/src/cell.js +428 -271
- package/lib/table/src/columnInfo.js +3 -2
- package/lib/table/src/footer.js +146 -101
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +231 -174
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/table.js +1487 -1045
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/index.js +4 -4
- package/lib/toolbar/src/toolbar.js +135 -78
- package/lib/ui/index.js +1 -3
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/v-x-e-table/index.js +0 -2
- package/package.json +8 -3
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -43
- 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 -4
- 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 -521
- 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 -4
- package/packages/v-x-e-table/index.ts +3 -4
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, ref, computed, provide, reactive, onBeforeUnmount, watch, nextTick, onMounted } from "vue";
|
|
2
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
2
3
|
import { defineVxeComponent } from "../../ui/src/comp";
|
|
3
4
|
import XEUtils from "xe-utils";
|
|
4
5
|
import { getLastZIndex, nextZIndex, isEnableConf } from "../../ui/src/utils";
|
|
5
6
|
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit, hasClass } from "../../ui/src/dom";
|
|
6
|
-
import { VxeUI } from "../../ui";
|
|
7
7
|
import { gridProps } from "./props";
|
|
8
8
|
import { gridEmits } from "./emits";
|
|
9
9
|
import { getSlotVNs } from "../../ui/src/vn";
|
|
@@ -15,7 +15,191 @@ import VxeToolbarComponent from "../../toolbar";
|
|
|
15
15
|
const { warnLog, errLog } = createComponentLog("grid");
|
|
16
16
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
17
17
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
18
|
-
const tableComponentMethodKeys = [
|
|
18
|
+
const tableComponentMethodKeys = [
|
|
19
|
+
"clearAll",
|
|
20
|
+
"syncData",
|
|
21
|
+
"updateData",
|
|
22
|
+
"loadData",
|
|
23
|
+
"reloadData",
|
|
24
|
+
"reloadRow",
|
|
25
|
+
"loadColumn",
|
|
26
|
+
"reloadColumn",
|
|
27
|
+
"getRowNode",
|
|
28
|
+
"getColumnNode",
|
|
29
|
+
"getRowIndex",
|
|
30
|
+
"getVTRowIndex",
|
|
31
|
+
"getVMRowIndex",
|
|
32
|
+
"getColumnIndex",
|
|
33
|
+
"getVTColumnIndex",
|
|
34
|
+
"getVMColumnIndex",
|
|
35
|
+
"setRow",
|
|
36
|
+
"createData",
|
|
37
|
+
"createRow",
|
|
38
|
+
"revertData",
|
|
39
|
+
"clearData",
|
|
40
|
+
"isRemoveByRow",
|
|
41
|
+
"isInsertByRow",
|
|
42
|
+
"isUpdateByRow",
|
|
43
|
+
"getColumns",
|
|
44
|
+
"getColumnById",
|
|
45
|
+
"getColumnByField",
|
|
46
|
+
"getTableColumn",
|
|
47
|
+
"getFullColumns",
|
|
48
|
+
"getData",
|
|
49
|
+
"getCheckboxRecords",
|
|
50
|
+
"getParentRow",
|
|
51
|
+
"getTreeRowChildren",
|
|
52
|
+
"getTreeRowLevel",
|
|
53
|
+
"getTreeParentRow",
|
|
54
|
+
"getRowSeq",
|
|
55
|
+
"getRowById",
|
|
56
|
+
"getRowid",
|
|
57
|
+
"getTableData",
|
|
58
|
+
"getFullData",
|
|
59
|
+
"setColumnFixed",
|
|
60
|
+
"clearColumnFixed",
|
|
61
|
+
"setColumnWidth",
|
|
62
|
+
"getColumnWidth",
|
|
63
|
+
"recalcRowHeight",
|
|
64
|
+
"setRowHeightConf",
|
|
65
|
+
"getRowHeightConf",
|
|
66
|
+
"setRowHeight",
|
|
67
|
+
"getRowHeight",
|
|
68
|
+
"hideColumn",
|
|
69
|
+
"showColumn",
|
|
70
|
+
"resetColumn",
|
|
71
|
+
"refreshColumn",
|
|
72
|
+
"refreshScroll",
|
|
73
|
+
"recalculate",
|
|
74
|
+
"closeTooltip",
|
|
75
|
+
"isAllCheckboxChecked",
|
|
76
|
+
"isAllCheckboxIndeterminate",
|
|
77
|
+
"getCheckboxIndeterminateRecords",
|
|
78
|
+
"setCheckboxRow",
|
|
79
|
+
"setCheckboxRowKey",
|
|
80
|
+
"isCheckedByCheckboxRow",
|
|
81
|
+
"isCheckedByCheckboxRowKey",
|
|
82
|
+
"isIndeterminateByCheckboxRow",
|
|
83
|
+
"isIndeterminateByCheckboxRowKey",
|
|
84
|
+
"toggleCheckboxRow",
|
|
85
|
+
"setAllCheckboxRow",
|
|
86
|
+
"getRadioReserveRecord",
|
|
87
|
+
"clearRadioReserve",
|
|
88
|
+
"getCheckboxReserveRecords",
|
|
89
|
+
"clearCheckboxReserve",
|
|
90
|
+
"toggleAllCheckboxRow",
|
|
91
|
+
"clearCheckboxRow",
|
|
92
|
+
"setCurrentRow",
|
|
93
|
+
"isCheckedByRadioRow",
|
|
94
|
+
"isCheckedByRadioRowKey",
|
|
95
|
+
"setRadioRow",
|
|
96
|
+
"setRadioRowKey",
|
|
97
|
+
"clearCurrentRow",
|
|
98
|
+
"clearRadioRow",
|
|
99
|
+
"getCurrentRecord",
|
|
100
|
+
"getRadioRecord",
|
|
101
|
+
"getCurrentColumn",
|
|
102
|
+
"setCurrentColumn",
|
|
103
|
+
"clearCurrentColumn",
|
|
104
|
+
"setPendingRow",
|
|
105
|
+
"togglePendingRow",
|
|
106
|
+
"hasPendingByRow",
|
|
107
|
+
"isPendingByRow",
|
|
108
|
+
"getPendingRecords",
|
|
109
|
+
"clearPendingRow",
|
|
110
|
+
"setFilterByEvent",
|
|
111
|
+
"sort",
|
|
112
|
+
"setSort",
|
|
113
|
+
"setSortByEvent",
|
|
114
|
+
"clearSort",
|
|
115
|
+
"clearSortByEvent",
|
|
116
|
+
"isSort",
|
|
117
|
+
"getSortColumns",
|
|
118
|
+
"closeFilter",
|
|
119
|
+
"isFilter",
|
|
120
|
+
"clearFilterByEvent",
|
|
121
|
+
"isActiveFilterByColumn",
|
|
122
|
+
"isRowExpandLoaded",
|
|
123
|
+
"clearRowExpandLoaded",
|
|
124
|
+
"reloadRowExpand",
|
|
125
|
+
"reloadRowExpand",
|
|
126
|
+
"toggleRowExpand",
|
|
127
|
+
"setAllRowExpand",
|
|
128
|
+
"setRowExpand",
|
|
129
|
+
"isExpandByRow",
|
|
130
|
+
"isRowExpandByRow",
|
|
131
|
+
"clearRowExpand",
|
|
132
|
+
"clearRowExpandReserve",
|
|
133
|
+
"getRowExpandRecords",
|
|
134
|
+
"getTreeExpandRecords",
|
|
135
|
+
"isTreeExpandLoaded",
|
|
136
|
+
"clearTreeExpandLoaded",
|
|
137
|
+
"reloadTreeExpand",
|
|
138
|
+
"reloadTreeChilds",
|
|
139
|
+
"toggleTreeExpand",
|
|
140
|
+
"setAllTreeExpand",
|
|
141
|
+
"setTreeExpand",
|
|
142
|
+
"isTreeExpandByRow",
|
|
143
|
+
"clearTreeExpand",
|
|
144
|
+
"clearTreeExpandReserve",
|
|
145
|
+
"getScroll",
|
|
146
|
+
"getScrollData",
|
|
147
|
+
"scrollTo",
|
|
148
|
+
"scrollToStartRow",
|
|
149
|
+
"scrollToEndRow",
|
|
150
|
+
"scrollToRow",
|
|
151
|
+
"scrollToStartColumn",
|
|
152
|
+
"scrollToEndColumn",
|
|
153
|
+
"scrollToColumn",
|
|
154
|
+
"clearScroll",
|
|
155
|
+
"updateFooter",
|
|
156
|
+
"updateStatus",
|
|
157
|
+
"setMergeCells",
|
|
158
|
+
"removeInsertRow",
|
|
159
|
+
"removeMergeCells",
|
|
160
|
+
"getMergeCells",
|
|
161
|
+
"setMergeHeaderCells",
|
|
162
|
+
"removeMergeHeaderCells",
|
|
163
|
+
"getMergeHeaderCells",
|
|
164
|
+
"clearMergeHeaderCells",
|
|
165
|
+
"clearMergeCells",
|
|
166
|
+
"setMergeFooterItems",
|
|
167
|
+
"removeMergeFooterItems",
|
|
168
|
+
"getMergeFooterItems",
|
|
169
|
+
"clearMergeFooterItems",
|
|
170
|
+
"setCustomStoreData",
|
|
171
|
+
"getCustomStoreData",
|
|
172
|
+
"setRowGroupExpand",
|
|
173
|
+
"setRowGroupExpandByField",
|
|
174
|
+
"setAllRowGroupExpand",
|
|
175
|
+
"clearRowGroupExpand",
|
|
176
|
+
"isRowGroupExpandByRow",
|
|
177
|
+
"isRowGroupRecord",
|
|
178
|
+
"isAggregateRecord",
|
|
179
|
+
"isAggregateExpandByRow",
|
|
180
|
+
"getAggregateContentByRow",
|
|
181
|
+
"getAggregateRowChildren",
|
|
182
|
+
"setRowGroups",
|
|
183
|
+
"clearRowGroups",
|
|
184
|
+
"openTooltip",
|
|
185
|
+
"moveColumnTo",
|
|
186
|
+
"moveRowTo",
|
|
187
|
+
"getCellLabel",
|
|
188
|
+
"updateCellLabel",
|
|
189
|
+
"clearFormatterCache",
|
|
190
|
+
"getFooterCellLabel",
|
|
191
|
+
"updateFooterCellLabel",
|
|
192
|
+
"clearFooterFormatterCache",
|
|
193
|
+
"getUpdateCells",
|
|
194
|
+
"undo",
|
|
195
|
+
"redo",
|
|
196
|
+
"effectCellData",
|
|
197
|
+
"getCellElement",
|
|
198
|
+
"focus",
|
|
199
|
+
"blur",
|
|
200
|
+
"connect",
|
|
201
|
+
"connectToolbar"
|
|
202
|
+
];
|
|
19
203
|
function createReactData() {
|
|
20
204
|
var _a;
|
|
21
205
|
return {
|
|
@@ -515,6 +699,7 @@ var grid_default = defineVxeComponent({
|
|
|
515
699
|
if (formOpts.items) {
|
|
516
700
|
const formSlots = {};
|
|
517
701
|
if (!formOpts.inited) {
|
|
702
|
+
;
|
|
518
703
|
formOpts.inited = true;
|
|
519
704
|
const beforeItem = proxyOpts.beforeItem;
|
|
520
705
|
if (proxyOpts && beforeItem) {
|
|
@@ -534,25 +719,33 @@ var grid_default = defineVxeComponent({
|
|
|
534
719
|
});
|
|
535
720
|
if (VxeUIFormComponent) {
|
|
536
721
|
slotVNs.push(
|
|
537
|
-
h(
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
722
|
+
h(
|
|
723
|
+
VxeUIFormComponent,
|
|
724
|
+
{
|
|
725
|
+
ref: refForm,
|
|
726
|
+
...Object.assign({}, formOpts, {
|
|
727
|
+
data: proxyConfig && isEnableConf(proxyOpts) && proxyOpts.form ? formData : formOpts.data
|
|
728
|
+
}),
|
|
729
|
+
onSubmit: submitFormEvent,
|
|
730
|
+
onReset: resetFormEvent,
|
|
731
|
+
onSubmitInvalid: submitInvalidEvent,
|
|
732
|
+
onCollapse: collapseEvent
|
|
733
|
+
},
|
|
734
|
+
formSlots
|
|
735
|
+
)
|
|
547
736
|
);
|
|
548
737
|
}
|
|
549
738
|
}
|
|
550
739
|
}
|
|
551
|
-
return h(
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
740
|
+
return h(
|
|
741
|
+
"div",
|
|
742
|
+
{
|
|
743
|
+
ref: refFormWrapper,
|
|
744
|
+
key: "form",
|
|
745
|
+
class: "vxe-grid--form-wrapper"
|
|
746
|
+
},
|
|
747
|
+
slotVNs
|
|
748
|
+
);
|
|
556
749
|
}
|
|
557
750
|
return renderEmptyElement($xeGrid);
|
|
558
751
|
};
|
|
@@ -594,47 +787,67 @@ var grid_default = defineVxeComponent({
|
|
|
594
787
|
}
|
|
595
788
|
}
|
|
596
789
|
slotVNs.push(
|
|
597
|
-
h(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
790
|
+
h(
|
|
791
|
+
VxeToolbarComponent,
|
|
792
|
+
{
|
|
793
|
+
ref: refToolbar,
|
|
794
|
+
...toolbarOpts,
|
|
795
|
+
slots: void 0
|
|
796
|
+
},
|
|
797
|
+
toolbarSlots
|
|
798
|
+
)
|
|
602
799
|
);
|
|
603
800
|
}
|
|
604
|
-
return h(
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
801
|
+
return h(
|
|
802
|
+
"div",
|
|
803
|
+
{
|
|
804
|
+
ref: refToolbarWrapper,
|
|
805
|
+
key: "toolbar",
|
|
806
|
+
class: "vxe-grid--toolbar-wrapper"
|
|
807
|
+
},
|
|
808
|
+
slotVNs
|
|
809
|
+
);
|
|
609
810
|
}
|
|
610
811
|
return renderEmptyElement($xeGrid);
|
|
611
812
|
};
|
|
612
813
|
const renderTop = () => {
|
|
613
814
|
const topSlot = slots.top;
|
|
614
815
|
if (topSlot) {
|
|
615
|
-
return h(
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
816
|
+
return h(
|
|
817
|
+
"div",
|
|
818
|
+
{
|
|
819
|
+
ref: refTopWrapper,
|
|
820
|
+
key: "top",
|
|
821
|
+
class: "vxe-grid--top-wrapper"
|
|
822
|
+
},
|
|
823
|
+
topSlot({ $grid: $xeGrid, $gantt: null })
|
|
824
|
+
);
|
|
620
825
|
}
|
|
621
826
|
return renderEmptyElement($xeGrid);
|
|
622
827
|
};
|
|
623
828
|
const renderTableLeft = () => {
|
|
624
829
|
const leftSlot = slots.left;
|
|
625
830
|
if (leftSlot) {
|
|
626
|
-
return h(
|
|
627
|
-
|
|
628
|
-
|
|
831
|
+
return h(
|
|
832
|
+
"div",
|
|
833
|
+
{
|
|
834
|
+
class: "vxe-grid--left-wrapper"
|
|
835
|
+
},
|
|
836
|
+
leftSlot({ $grid: $xeGrid, $gantt: null })
|
|
837
|
+
);
|
|
629
838
|
}
|
|
630
839
|
return renderEmptyElement($xeGrid);
|
|
631
840
|
};
|
|
632
841
|
const renderTableRight = () => {
|
|
633
842
|
const rightSlot = slots.right;
|
|
634
843
|
if (rightSlot) {
|
|
635
|
-
return h(
|
|
636
|
-
|
|
637
|
-
|
|
844
|
+
return h(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
class: "vxe-grid--right-wrapper"
|
|
848
|
+
},
|
|
849
|
+
rightSlot({ $grid: $xeGrid, $gantt: null })
|
|
850
|
+
);
|
|
638
851
|
}
|
|
639
852
|
return renderEmptyElement($xeGrid);
|
|
640
853
|
};
|
|
@@ -682,23 +895,35 @@ var grid_default = defineVxeComponent({
|
|
|
682
895
|
if (footerTooltipSlot) {
|
|
683
896
|
slotObj.footerTooltip = footerTooltipSlot;
|
|
684
897
|
}
|
|
685
|
-
return h(
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
898
|
+
return h(
|
|
899
|
+
"div",
|
|
900
|
+
{
|
|
901
|
+
class: "vxe-grid--table-wrapper"
|
|
902
|
+
},
|
|
903
|
+
[
|
|
904
|
+
h(
|
|
905
|
+
VxeTableComponent,
|
|
906
|
+
{
|
|
907
|
+
ref: refTable,
|
|
908
|
+
...tableProps2,
|
|
909
|
+
...tableOns
|
|
910
|
+
},
|
|
911
|
+
slotObj
|
|
912
|
+
)
|
|
913
|
+
]
|
|
914
|
+
);
|
|
694
915
|
};
|
|
695
916
|
const renderBottom = () => {
|
|
696
917
|
if (slots.bottom) {
|
|
697
|
-
return h(
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
918
|
+
return h(
|
|
919
|
+
"div",
|
|
920
|
+
{
|
|
921
|
+
ref: refBottomWrapper,
|
|
922
|
+
key: "bottom",
|
|
923
|
+
class: "vxe-grid--bottom-wrapper"
|
|
924
|
+
},
|
|
925
|
+
slots.bottom({ $grid: $xeGrid, $gantt: null })
|
|
926
|
+
);
|
|
702
927
|
}
|
|
703
928
|
return renderEmptyElement($xeGrid);
|
|
704
929
|
};
|
|
@@ -709,18 +934,26 @@ var grid_default = defineVxeComponent({
|
|
|
709
934
|
const pagerProps = computePagerProps.value;
|
|
710
935
|
const pagerSlot = slots.pager;
|
|
711
936
|
if (pagerConfig && isEnableConf(pagerOpts) || slots.pager) {
|
|
712
|
-
return h(
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
937
|
+
return h(
|
|
938
|
+
"div",
|
|
939
|
+
{
|
|
940
|
+
ref: refPagerWrapper,
|
|
941
|
+
key: "pager",
|
|
942
|
+
class: "vxe-grid--pager-wrapper"
|
|
943
|
+
},
|
|
944
|
+
pagerSlot ? pagerSlot({ $grid: $xeGrid, $gantt: null }) : [
|
|
945
|
+
VxeUIPagerComponent ? h(
|
|
946
|
+
VxeUIPagerComponent,
|
|
947
|
+
{
|
|
948
|
+
ref: refPager,
|
|
949
|
+
...pagerProps,
|
|
950
|
+
...proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {},
|
|
951
|
+
onPageChange: pageChangeEvent
|
|
952
|
+
},
|
|
953
|
+
getConfigSlot(pagerOpts.slots)
|
|
954
|
+
) : renderEmptyElement($xeGrid)
|
|
955
|
+
]
|
|
956
|
+
);
|
|
724
957
|
}
|
|
725
958
|
return renderEmptyElement($xeGrid);
|
|
726
959
|
};
|
|
@@ -739,14 +972,14 @@ var grid_default = defineVxeComponent({
|
|
|
739
972
|
break;
|
|
740
973
|
case "Table":
|
|
741
974
|
childVNs.push(
|
|
742
|
-
h(
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
renderTableRight()
|
|
749
|
-
|
|
975
|
+
h(
|
|
976
|
+
"div",
|
|
977
|
+
{
|
|
978
|
+
key: "table",
|
|
979
|
+
class: "vxe-grid--table-container"
|
|
980
|
+
},
|
|
981
|
+
[renderTableLeft(), renderTable(), renderTableRight()]
|
|
982
|
+
)
|
|
750
983
|
);
|
|
751
984
|
break;
|
|
752
985
|
case "Bottom":
|
|
@@ -768,25 +1001,49 @@ var grid_default = defineVxeComponent({
|
|
|
768
1001
|
const asideLeftSlot = slots.asideLeft || slots["aside-left"];
|
|
769
1002
|
const asideRightSlot = slots.asideRight || slots["aside-right"];
|
|
770
1003
|
return [
|
|
771
|
-
h(
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
class: "vxe-grid--layout-body-
|
|
782
|
-
},
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
1004
|
+
h(
|
|
1005
|
+
"div",
|
|
1006
|
+
{
|
|
1007
|
+
class: "vxe-grid--layout-header-wrapper"
|
|
1008
|
+
},
|
|
1009
|
+
renderChildLayout(headKeys)
|
|
1010
|
+
),
|
|
1011
|
+
h(
|
|
1012
|
+
"div",
|
|
1013
|
+
{
|
|
1014
|
+
class: "vxe-grid--layout-body-wrapper"
|
|
1015
|
+
},
|
|
1016
|
+
[
|
|
1017
|
+
asideLeftSlot ? h(
|
|
1018
|
+
"div",
|
|
1019
|
+
{
|
|
1020
|
+
class: "vxe-grid--layout-aside-left-wrapper"
|
|
1021
|
+
},
|
|
1022
|
+
asideLeftSlot({})
|
|
1023
|
+
) : renderEmptyElement($xeGrid),
|
|
1024
|
+
h(
|
|
1025
|
+
"div",
|
|
1026
|
+
{
|
|
1027
|
+
class: "vxe-grid--layout-body-content-wrapper"
|
|
1028
|
+
},
|
|
1029
|
+
renderChildLayout(bodyKeys)
|
|
1030
|
+
),
|
|
1031
|
+
asideRightSlot ? h(
|
|
1032
|
+
"div",
|
|
1033
|
+
{
|
|
1034
|
+
class: "vxe-grid--layout-aside-right-wrapper"
|
|
1035
|
+
},
|
|
1036
|
+
asideRightSlot({})
|
|
1037
|
+
) : renderEmptyElement($xeGrid)
|
|
1038
|
+
]
|
|
1039
|
+
),
|
|
1040
|
+
h(
|
|
1041
|
+
"div",
|
|
1042
|
+
{
|
|
1043
|
+
class: "vxe-grid--layout-footer-wrapper"
|
|
1044
|
+
},
|
|
1045
|
+
renderChildLayout(footKeys)
|
|
1046
|
+
),
|
|
790
1047
|
h("div", {
|
|
791
1048
|
ref: refPopupContainerElem
|
|
792
1049
|
})
|
|
@@ -1021,10 +1278,7 @@ var grid_default = defineVxeComponent({
|
|
|
1021
1278
|
reactData.sortData = sortList;
|
|
1022
1279
|
reactData.filterData = filterList;
|
|
1023
1280
|
reactData.tableLoading = true;
|
|
1024
|
-
return Promise.all([
|
|
1025
|
-
Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)),
|
|
1026
|
-
operPromise
|
|
1027
|
-
]).then(([rest]) => {
|
|
1281
|
+
return Promise.all([Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)), operPromise]).then(([rest]) => {
|
|
1028
1282
|
reactData.tableLoading = false;
|
|
1029
1283
|
if (aqMethod) {
|
|
1030
1284
|
aqMethod({ ...commitParams, response: rest, status: "success" }, ...args);
|
|
@@ -1395,9 +1649,13 @@ var grid_default = defineVxeComponent({
|
|
|
1395
1649
|
const { formConfig } = props;
|
|
1396
1650
|
const { items } = formOpts;
|
|
1397
1651
|
const itemList = [];
|
|
1398
|
-
XEUtils.eachTree(
|
|
1399
|
-
|
|
1400
|
-
|
|
1652
|
+
XEUtils.eachTree(
|
|
1653
|
+
formConfig && isEnableConf(formOpts) && items ? items : [],
|
|
1654
|
+
(item) => {
|
|
1655
|
+
itemList.push(item);
|
|
1656
|
+
},
|
|
1657
|
+
{ children: "children" }
|
|
1658
|
+
);
|
|
1401
1659
|
return XEUtils.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
|
|
1402
1660
|
},
|
|
1403
1661
|
getFormFlatItems() {
|
|
@@ -1665,31 +1923,47 @@ var grid_default = defineVxeComponent({
|
|
|
1665
1923
|
const vSize = computeSize.value;
|
|
1666
1924
|
const styles = computeStyles.value;
|
|
1667
1925
|
const isLoading = computeIsLoading.value;
|
|
1668
|
-
return h(
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1926
|
+
return h(
|
|
1927
|
+
"div",
|
|
1928
|
+
{
|
|
1929
|
+
ref: refElem,
|
|
1930
|
+
class: [
|
|
1931
|
+
"vxe-grid",
|
|
1932
|
+
{
|
|
1933
|
+
[`size--${vSize}`]: vSize,
|
|
1934
|
+
"is--animat": !!props.animat,
|
|
1935
|
+
"is--round": props.round,
|
|
1936
|
+
"is--maximize": reactData.isZMax,
|
|
1937
|
+
"is--loading": isLoading
|
|
1938
|
+
}
|
|
1939
|
+
],
|
|
1940
|
+
style: styles
|
|
1941
|
+
},
|
|
1942
|
+
renderLayout()
|
|
1943
|
+
);
|
|
1679
1944
|
};
|
|
1680
1945
|
const columnFlag = ref(0);
|
|
1681
|
-
watch(
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1946
|
+
watch(
|
|
1947
|
+
() => props.columns ? props.columns.length : -1,
|
|
1948
|
+
() => {
|
|
1949
|
+
columnFlag.value++;
|
|
1950
|
+
}
|
|
1951
|
+
);
|
|
1952
|
+
watch(
|
|
1953
|
+
() => props.columns,
|
|
1954
|
+
() => {
|
|
1955
|
+
columnFlag.value++;
|
|
1956
|
+
}
|
|
1957
|
+
);
|
|
1687
1958
|
watch(columnFlag, () => {
|
|
1688
1959
|
nextTick(() => $xeGrid.loadColumn(props.columns || []));
|
|
1689
1960
|
});
|
|
1690
|
-
watch(
|
|
1691
|
-
|
|
1692
|
-
|
|
1961
|
+
watch(
|
|
1962
|
+
() => props.toolbarConfig,
|
|
1963
|
+
() => {
|
|
1964
|
+
initToolbar();
|
|
1965
|
+
}
|
|
1966
|
+
);
|
|
1693
1967
|
watch(computeCustomCurrentPageFlag, () => {
|
|
1694
1968
|
initPages("currentPage");
|
|
1695
1969
|
});
|
|
@@ -1699,9 +1973,12 @@ var grid_default = defineVxeComponent({
|
|
|
1699
1973
|
watch(computeCustomTotalFlag, () => {
|
|
1700
1974
|
initPages("total");
|
|
1701
1975
|
});
|
|
1702
|
-
watch(
|
|
1703
|
-
|
|
1704
|
-
|
|
1976
|
+
watch(
|
|
1977
|
+
() => props.proxyConfig,
|
|
1978
|
+
() => {
|
|
1979
|
+
initProxy();
|
|
1980
|
+
}
|
|
1981
|
+
);
|
|
1705
1982
|
hooks.forEach((options) => {
|
|
1706
1983
|
const { setupGrid } = options;
|
|
1707
1984
|
if (setupGrid) {
|
package/es/grid/src/props.js
CHANGED
package/es/index.esm.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as VxeUITableExport from "./components";
|
|
2
|
+
if (typeof window !== "undefined" && window.Vue) {
|
|
3
|
+
if (!window.VXETable) {
|
|
4
|
+
;
|
|
5
|
+
window.VXETable = VxeUITableExport;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
2
8
|
export * from "./components";
|
|
3
9
|
var index_default = VxeUITableExport;
|
|
4
10
|
export {
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as VxeUITableExport from "./components";
|
|
2
|
+
if (typeof window !== "undefined" && window.Vue) {
|
|
3
|
+
if (!window.VXETable) {
|
|
4
|
+
;
|
|
5
|
+
window.VXETable = VxeUITableExport;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
2
8
|
export * from "./components";
|
|
3
9
|
var index_default = VxeUITableExport;
|
|
4
10
|
export {
|
package/es/table/index.js
CHANGED