vxe-table 3.15.39 → 3.15.40
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/es/grid/src/grid.js +73 -49
- package/es/{iconfont.1749800510225.ttf → iconfont.1750082820248.ttf} +0 -0
- package/es/iconfont.1750082820248.woff +0 -0
- package/es/iconfont.1750082820248.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +29 -3
- package/es/table/module/custom/panel.js +118 -105
- package/es/table/src/body.js +8 -5
- package/es/table/src/methods.js +34 -26
- package/es/table/src/props.js +32 -8
- package/es/table/src/table.js +57 -38
- package/es/table/style.css +22 -3
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -0
- package/es/vxe-table/style.css +22 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +81 -82
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/{iconfont.1749800510225.ttf → iconfont.1750082820248.ttf} +0 -0
- package/lib/iconfont.1750082820248.woff +0 -0
- package/lib/iconfont.1750082820248.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +282 -184
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +32 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +14 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +11 -11
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +38 -25
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +32 -8
- package/lib/table/src/table.js +64 -50
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +22 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -0
- package/lib/ui/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +22 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +93 -54
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/mixin.ts +27 -3
- package/packages/table/module/custom/panel.ts +119 -106
- package/packages/table/src/body.ts +13 -10
- package/packages/table/src/cell.ts +12 -12
- package/packages/table/src/methods.ts +35 -26
- package/packages/table/src/props.ts +32 -8
- package/packages/table/src/table.ts +76 -49
- package/packages/ui/index.ts +11 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table-module/custom.scss +9 -2
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1749800510225.woff +0 -0
- package/es/iconfont.1749800510225.woff2 +0 -0
- package/lib/iconfont.1749800510225.woff +0 -0
- package/lib/iconfont.1749800510225.woff2 +0 -0
|
@@ -44,7 +44,8 @@ export default {
|
|
|
44
44
|
_saveCustom() {
|
|
45
45
|
const $xeTable = this;
|
|
46
46
|
const reactData = $xeTable;
|
|
47
|
-
const {
|
|
47
|
+
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
48
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
48
49
|
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
|
|
49
50
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
50
51
|
if (parentColumn) {
|
|
@@ -77,7 +78,19 @@ export default {
|
|
|
77
78
|
setTimeout(() => {
|
|
78
79
|
reactData.isDragColMove = false;
|
|
79
80
|
}, 1000);
|
|
80
|
-
return $xeTable.saveCustomStore('confirm')
|
|
81
|
+
return $xeTable.saveCustomStore('confirm').then(() => {
|
|
82
|
+
if ($xeTable.handlePivotTableAggregateData) {
|
|
83
|
+
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
84
|
+
// 改动聚合分组
|
|
85
|
+
if (aggHandleFields.length) {
|
|
86
|
+
$xeTable.setRowGroups(aggHandleFields);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
$xeTable.clearRowGroups();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
81
94
|
},
|
|
82
95
|
_cancelCustom() {
|
|
83
96
|
const $xeTable = this;
|
|
@@ -111,6 +124,7 @@ export default {
|
|
|
111
124
|
const $xeTable = this;
|
|
112
125
|
const reactData = $xeTable;
|
|
113
126
|
const internalData = $xeTable;
|
|
127
|
+
const { rowGroupList } = reactData;
|
|
114
128
|
const { collectColumn } = internalData;
|
|
115
129
|
const customOpts = $xeTable.computeCustomOpts;
|
|
116
130
|
const { checkMethod } = customOpts;
|
|
@@ -137,7 +151,19 @@ export default {
|
|
|
137
151
|
});
|
|
138
152
|
reactData.isCustomStatus = false;
|
|
139
153
|
$xeTable.saveCustomStore('reset');
|
|
140
|
-
return $xeTable.handleCustom()
|
|
154
|
+
return $xeTable.handleCustom().then(() => {
|
|
155
|
+
if ($xeTable.handlePivotTableAggregateData) {
|
|
156
|
+
const rowGroupFields = $xeTable.computeRowGroupFields;
|
|
157
|
+
if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
|
|
158
|
+
if (rowGroupFields && rowGroupFields.length) {
|
|
159
|
+
$xeTable.setRowGroups(rowGroupFields);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
$xeTable.clearRowGroups();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
141
167
|
},
|
|
142
168
|
_toggleCustomAllCheckbox() {
|
|
143
169
|
const { customStore } = this;
|
|
@@ -88,9 +88,11 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
88
88
|
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
89
89
|
const props = _vm;
|
|
90
90
|
const $xeTable = _vm.$xeTable;
|
|
91
|
+
const tableProps = $xeTable;
|
|
91
92
|
const reactData = $xeTable;
|
|
92
93
|
const $xeGrid = $xeTable.$xeGrid;
|
|
93
94
|
const { customStore } = props;
|
|
95
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
94
96
|
const { isCustomStatus, customColumnList } = reactData;
|
|
95
97
|
const customOpts = $xeTable.computeCustomOpts;
|
|
96
98
|
const { immediate } = customOpts;
|
|
@@ -261,124 +263,135 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
261
263
|
: {}
|
|
262
264
|
}, customStore.visible
|
|
263
265
|
? [
|
|
266
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
267
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
268
|
+
props: {
|
|
269
|
+
customStore
|
|
270
|
+
}
|
|
271
|
+
})
|
|
272
|
+
: renderEmptyElement($xeTable),
|
|
264
273
|
h('div', {
|
|
265
|
-
class: 'vxe-table-custom--
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
h('
|
|
273
|
-
class: 'vxe-table-custom--
|
|
274
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
275
|
+
}, [
|
|
276
|
+
h('div', {
|
|
277
|
+
class: 'vxe-table-custom--header'
|
|
278
|
+
}, headerSlot
|
|
279
|
+
? $xeTable.callSlot(headerSlot, params, h)
|
|
280
|
+
: [
|
|
281
|
+
h('ul', {
|
|
282
|
+
class: 'vxe-table-custom--panel-list'
|
|
274
283
|
}, [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
284
|
+
h('li', {
|
|
285
|
+
class: 'vxe-table-custom--option'
|
|
286
|
+
}, [
|
|
287
|
+
allowVisible
|
|
288
|
+
? h('div', {
|
|
289
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
290
|
+
'is--checked': isAllChecked,
|
|
291
|
+
'is--indeterminate': isAllIndeterminate
|
|
292
|
+
}],
|
|
293
|
+
attrs: {
|
|
294
|
+
title: getI18n('vxe.table.allTitle')
|
|
295
|
+
},
|
|
296
|
+
on: {
|
|
297
|
+
click: _vm.allOptionEvent
|
|
298
|
+
}
|
|
299
|
+
}, [
|
|
300
|
+
h('span', {
|
|
301
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
302
|
+
}),
|
|
303
|
+
h('span', {
|
|
304
|
+
class: 'vxe-checkbox--label'
|
|
305
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
306
|
+
])
|
|
307
|
+
: h('span', {
|
|
292
308
|
class: 'vxe-checkbox--label'
|
|
293
|
-
}, getI18n('vxe.
|
|
294
|
-
|
|
295
|
-
: h('span', {
|
|
296
|
-
class: 'vxe-checkbox--label'
|
|
297
|
-
}, getI18n('vxe.table.customTitle'))
|
|
309
|
+
}, getI18n('vxe.table.customTitle'))
|
|
310
|
+
])
|
|
298
311
|
])
|
|
299
|
-
])
|
|
312
|
+
]),
|
|
313
|
+
h('div', {
|
|
314
|
+
ref: 'bodyElemRef',
|
|
315
|
+
class: 'vxe-table-custom--body'
|
|
316
|
+
}, [
|
|
317
|
+
topSlot
|
|
318
|
+
? h('div', {
|
|
319
|
+
class: 'vxe-table-custom--panel-top'
|
|
320
|
+
}, $xeTable.callSlot(topSlot, params, h))
|
|
321
|
+
: renderEmptyElement($xeTable),
|
|
322
|
+
defaultSlot
|
|
323
|
+
? h('div', {
|
|
324
|
+
class: 'vxe-table-custom--panel-body'
|
|
325
|
+
}, $xeTable.callSlot(defaultSlot, params, h))
|
|
326
|
+
: h('transition-group', {
|
|
327
|
+
class: 'vxe-table-custom--panel-list',
|
|
328
|
+
props: {
|
|
329
|
+
name: 'vxe-table-custom--list',
|
|
330
|
+
tag: 'ul'
|
|
331
|
+
},
|
|
332
|
+
on: customWrapperOns
|
|
333
|
+
}, colVNs),
|
|
334
|
+
bottomSlot
|
|
335
|
+
? h('div', {
|
|
336
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
337
|
+
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
338
|
+
: renderEmptyElement($xeTable),
|
|
339
|
+
renderDragTip(h, _vm)
|
|
300
340
|
]),
|
|
301
|
-
|
|
302
|
-
ref: 'bodyElemRef',
|
|
303
|
-
class: 'vxe-table-custom--body'
|
|
304
|
-
}, [
|
|
305
|
-
topSlot
|
|
306
|
-
? h('div', {
|
|
307
|
-
class: 'vxe-table-custom--panel-top'
|
|
308
|
-
}, $xeTable.callSlot(topSlot, params, h))
|
|
309
|
-
: renderEmptyElement($xeTable),
|
|
310
|
-
defaultSlot
|
|
341
|
+
customOpts.showFooter
|
|
311
342
|
? h('div', {
|
|
312
|
-
class: 'vxe-table-custom--
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
on: customWrapperOns
|
|
321
|
-
}, colVNs),
|
|
322
|
-
bottomSlot
|
|
323
|
-
? h('div', {
|
|
324
|
-
class: 'vxe-table-custom--panel-bottom'
|
|
325
|
-
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
326
|
-
: renderEmptyElement($xeTable),
|
|
327
|
-
renderDragTip(h, _vm)
|
|
328
|
-
]),
|
|
329
|
-
customOpts.showFooter
|
|
330
|
-
? h('div', {
|
|
331
|
-
class: 'vxe-table-custom--footer'
|
|
332
|
-
}, footerSlot
|
|
333
|
-
? $xeTable.callSlot(footerSlot, params, h)
|
|
334
|
-
: [
|
|
335
|
-
h('div', {
|
|
336
|
-
class: 'vxe-table-custom--footer-buttons'
|
|
337
|
-
}, [
|
|
338
|
-
h(VxeUIButtonComponent, {
|
|
339
|
-
props: {
|
|
340
|
-
mode: 'text',
|
|
341
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
342
|
-
disabled: !isCustomStatus
|
|
343
|
-
},
|
|
344
|
-
on: {
|
|
345
|
-
click: _vm.resetCustomEvent
|
|
346
|
-
}
|
|
347
|
-
}),
|
|
348
|
-
immediate
|
|
349
|
-
? h(VxeUIButtonComponent, {
|
|
350
|
-
props: {
|
|
351
|
-
mode: 'text',
|
|
352
|
-
content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
|
|
353
|
-
},
|
|
354
|
-
on: {
|
|
355
|
-
click: _vm.cancelCloseEvent
|
|
356
|
-
}
|
|
357
|
-
})
|
|
358
|
-
: h(VxeUIButtonComponent, {
|
|
343
|
+
class: 'vxe-table-custom--footer'
|
|
344
|
+
}, footerSlot
|
|
345
|
+
? $xeTable.callSlot(footerSlot, params, h)
|
|
346
|
+
: [
|
|
347
|
+
h('div', {
|
|
348
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
349
|
+
}, [
|
|
350
|
+
h(VxeUIButtonComponent, {
|
|
359
351
|
props: {
|
|
360
352
|
mode: 'text',
|
|
361
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.
|
|
353
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
354
|
+
disabled: !isCustomStatus
|
|
362
355
|
},
|
|
363
356
|
on: {
|
|
364
|
-
click: _vm.
|
|
357
|
+
click: _vm.resetCustomEvent
|
|
365
358
|
}
|
|
366
359
|
}),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
360
|
+
immediate
|
|
361
|
+
? h(VxeUIButtonComponent, {
|
|
362
|
+
props: {
|
|
363
|
+
mode: 'text',
|
|
364
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose')
|
|
365
|
+
},
|
|
366
|
+
on: {
|
|
367
|
+
click: _vm.cancelCloseEvent
|
|
368
|
+
}
|
|
369
|
+
})
|
|
370
|
+
: h(VxeUIButtonComponent, {
|
|
371
|
+
props: {
|
|
372
|
+
mode: 'text',
|
|
373
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customCancel')
|
|
374
|
+
},
|
|
375
|
+
on: {
|
|
376
|
+
click: _vm.cancelCustomEvent
|
|
377
|
+
}
|
|
378
|
+
}),
|
|
379
|
+
immediate
|
|
380
|
+
? renderEmptyElement($xeTable)
|
|
381
|
+
: h(VxeUIButtonComponent, {
|
|
382
|
+
props: {
|
|
383
|
+
mode: 'text',
|
|
384
|
+
status: 'primary',
|
|
385
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm')
|
|
386
|
+
},
|
|
387
|
+
on: {
|
|
388
|
+
click: _vm.confirmCustomEvent
|
|
389
|
+
}
|
|
390
|
+
})
|
|
391
|
+
])
|
|
379
392
|
])
|
|
380
|
-
|
|
381
|
-
|
|
393
|
+
: null
|
|
394
|
+
])
|
|
382
395
|
]
|
|
383
396
|
: []);
|
|
384
397
|
};
|
package/es/table/src/body.js
CHANGED
|
@@ -564,7 +564,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
564
564
|
const { showOverflow } = expandColumn || {};
|
|
565
565
|
const colid = expandColumn.id;
|
|
566
566
|
const colRest = fullColumnIdData[colid] || {};
|
|
567
|
-
const hasEllipsis =
|
|
567
|
+
const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
568
568
|
let columnIndex = -1;
|
|
569
569
|
let $columnIndex = -1;
|
|
570
570
|
let _columnIndex = -1;
|
|
@@ -680,7 +680,8 @@ export default {
|
|
|
680
680
|
const tableReactData = $xeTable;
|
|
681
681
|
const tableInternalData = $xeTable;
|
|
682
682
|
const $xeGrid = $xeTable.$xeGrid;
|
|
683
|
-
const
|
|
683
|
+
const slots = $xeTable.$scopedSlots;
|
|
684
|
+
const { xID } = $xeTable;
|
|
684
685
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
685
686
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
686
687
|
const { isGroup, tableData, isRowLoading, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
@@ -759,14 +760,16 @@ export default {
|
|
|
759
760
|
}
|
|
760
761
|
}
|
|
761
762
|
let emptyContent;
|
|
762
|
-
|
|
763
|
-
|
|
763
|
+
const emptySlot = slots ? slots.empty : null;
|
|
764
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid };
|
|
765
|
+
if (emptySlot) {
|
|
766
|
+
emptyContent = emptySlot.call($xeTable, emptyParams);
|
|
764
767
|
}
|
|
765
768
|
else {
|
|
766
769
|
const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
|
|
767
770
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
768
771
|
if (rtEmptyView) {
|
|
769
|
-
emptyContent = getSlotVNs(rtEmptyView.call(
|
|
772
|
+
emptyContent = getSlotVNs(rtEmptyView.call($xeTable, h, emptyOpts, emptyParams));
|
|
770
773
|
}
|
|
771
774
|
else {
|
|
772
775
|
emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText');
|
package/es/table/src/methods.js
CHANGED
|
@@ -23,6 +23,9 @@ function eqCellValue(row1, row2, field) {
|
|
|
23
23
|
}
|
|
24
24
|
return XEUtils.isEqual(val1, val2);
|
|
25
25
|
}
|
|
26
|
+
function hangleStorageDefaultValue(value, isAll) {
|
|
27
|
+
return XEUtils.isBoolean(value) ? value : isAll;
|
|
28
|
+
}
|
|
26
29
|
function getNextSortOrder($xeTable, column) {
|
|
27
30
|
const sortOpts = $xeTable.computeSortOpts;
|
|
28
31
|
const { orders = [] } = sortOpts;
|
|
@@ -157,13 +160,13 @@ function restoreCustomStorage($xeTable) {
|
|
|
157
160
|
const { customConfig } = props;
|
|
158
161
|
const tableId = $xeTable.computeTableId;
|
|
159
162
|
const customOpts = $xeTable.computeCustomOpts;
|
|
160
|
-
const { storage, restoreStore } = customOpts;
|
|
163
|
+
const { storage, restoreStore, storeOptions } = customOpts;
|
|
161
164
|
const isAllCustom = storage === true;
|
|
162
|
-
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
163
|
-
const isCustomResizable =
|
|
164
|
-
const isCustomVisible =
|
|
165
|
-
const isCustomFixed =
|
|
166
|
-
const isCustomSort =
|
|
165
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
|
|
166
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
167
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
168
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
169
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
167
170
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
168
171
|
if (!tableId) {
|
|
169
172
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -2610,13 +2613,18 @@ function handleRecalculateLayout($xeTable, reFull) {
|
|
|
2610
2613
|
}
|
|
2611
2614
|
const handleUpdateRowGroup = ($xeTable, groupFields) => {
|
|
2612
2615
|
const reactData = $xeTable;
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
+
const aggFields = [];
|
|
2617
|
+
const aggConfs = [];
|
|
2618
|
+
if (groupFields) {
|
|
2619
|
+
(XEUtils.isArray(groupFields) ? groupFields : [groupFields]).forEach(field => {
|
|
2620
|
+
aggFields.push(field);
|
|
2621
|
+
aggConfs.push({
|
|
2616
2622
|
field
|
|
2617
|
-
};
|
|
2618
|
-
})
|
|
2619
|
-
|
|
2623
|
+
});
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
reactData.rowGroupList = aggConfs;
|
|
2627
|
+
reactData.aggHandleFields = aggFields;
|
|
2620
2628
|
};
|
|
2621
2629
|
function handleeGroupSummary($xeTable, aggList) {
|
|
2622
2630
|
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
@@ -2803,9 +2811,9 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2803
2811
|
internalData.cvCacheMaps = {};
|
|
2804
2812
|
reactData.isRowLoading = true;
|
|
2805
2813
|
reactData.scrollVMLoading = false;
|
|
2806
|
-
internalData.treeExpandedMaps = {}
|
|
2814
|
+
// internalData.treeExpandedMaps = {}
|
|
2807
2815
|
reactData.treeExpandedFlag++;
|
|
2808
|
-
internalData.rowExpandedMaps = {}
|
|
2816
|
+
// internalData.rowExpandedMaps = {}
|
|
2809
2817
|
reactData.rowExpandedFlag++;
|
|
2810
2818
|
internalData.insertRowMaps = {};
|
|
2811
2819
|
reactData.insertRowFlag++;
|
|
@@ -4906,13 +4914,13 @@ const Methods = {
|
|
|
4906
4914
|
const { customConfig } = props;
|
|
4907
4915
|
const tableId = $xeTable.computeTableId;
|
|
4908
4916
|
const customOpts = $xeTable.computeCustomOpts;
|
|
4909
|
-
const { storage, restoreStore } = customOpts;
|
|
4917
|
+
const { storage, restoreStore, storeOptions } = customOpts;
|
|
4910
4918
|
const isAllCustom = storage === true;
|
|
4911
|
-
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
4912
|
-
const isCustomResizable =
|
|
4913
|
-
const isCustomVisible =
|
|
4914
|
-
const isCustomFixed =
|
|
4915
|
-
const isCustomSort =
|
|
4919
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
|
|
4920
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
4921
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
4922
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
4923
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
4916
4924
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
4917
4925
|
if (!tableId) {
|
|
4918
4926
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -4939,13 +4947,13 @@ const Methods = {
|
|
|
4939
4947
|
const { id } = props;
|
|
4940
4948
|
const customOpts = $xeTable.computeCustomOpts;
|
|
4941
4949
|
const { collectColumn } = internalData;
|
|
4942
|
-
const { storage, checkMethod } = customOpts;
|
|
4950
|
+
const { storage, checkMethod, storeOptions } = customOpts;
|
|
4943
4951
|
const isAllCustom = storage === true;
|
|
4944
|
-
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
4945
|
-
const isCustomResizable =
|
|
4946
|
-
const isCustomVisible =
|
|
4947
|
-
const isCustomFixed =
|
|
4948
|
-
const isCustomSort =
|
|
4952
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {}, storeOptions);
|
|
4953
|
+
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
4954
|
+
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
4955
|
+
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
4956
|
+
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
4949
4957
|
const resizableData = {};
|
|
4950
4958
|
const sortData = {};
|
|
4951
4959
|
const visibleData = {};
|
package/es/table/src/props.js
CHANGED
|
@@ -144,11 +144,20 @@ export default {
|
|
|
144
144
|
// 设置表尾所有内容过长时显示为省略号
|
|
145
145
|
showFooterOverflow: { type: [Boolean, String], default: () => getConfig().table.showFooterOverflow },
|
|
146
146
|
/** 高级属性 */
|
|
147
|
-
|
|
147
|
+
/**
|
|
148
|
+
* (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
|
|
149
|
+
* @deprecated
|
|
150
|
+
*/
|
|
148
151
|
columnKey: Boolean,
|
|
149
|
-
|
|
152
|
+
/**
|
|
153
|
+
* (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
|
|
154
|
+
* @deprecated
|
|
155
|
+
*/
|
|
150
156
|
rowKey: Boolean,
|
|
151
|
-
|
|
157
|
+
/**
|
|
158
|
+
* (即将废弃)rowId 已废弃,被 row-config.keyField 替换
|
|
159
|
+
* @deprecated
|
|
160
|
+
*/
|
|
152
161
|
rowId: { type: String, default: () => getConfig().table.rowId },
|
|
153
162
|
zIndex: Number,
|
|
154
163
|
emptyText: { type: String, default: () => getConfig().table.emptyText },
|
|
@@ -173,11 +182,17 @@ export default {
|
|
|
173
182
|
rowConfig: Object,
|
|
174
183
|
// 数据聚合配置项
|
|
175
184
|
aggregateConfig: Object,
|
|
176
|
-
|
|
185
|
+
/**
|
|
186
|
+
* 已废弃,被 aggregateConfig 替换
|
|
187
|
+
* @deprecated
|
|
188
|
+
*/
|
|
177
189
|
rowGroupConfig: Object,
|
|
178
190
|
// 当前行配置项
|
|
179
191
|
currentRowConfig: Object,
|
|
180
|
-
|
|
192
|
+
/**
|
|
193
|
+
* 已废弃,被 rowDragConfig 替换
|
|
194
|
+
* @deprecated
|
|
195
|
+
*/
|
|
181
196
|
dragConfig: Object,
|
|
182
197
|
// 行拖拽排序配置项
|
|
183
198
|
rowDragConfig: Object,
|
|
@@ -209,7 +224,10 @@ export default {
|
|
|
209
224
|
treeConfig: [Boolean, Object],
|
|
210
225
|
// 快捷菜单配置项
|
|
211
226
|
menuConfig: [Boolean, Object],
|
|
212
|
-
|
|
227
|
+
/**
|
|
228
|
+
* 在 v4 中废弃 contextMenu
|
|
229
|
+
* @deprecated
|
|
230
|
+
*/
|
|
213
231
|
contextMenu: [Boolean, Object],
|
|
214
232
|
// 鼠标配置项
|
|
215
233
|
mouseConfig: Object,
|
|
@@ -233,9 +251,15 @@ export default {
|
|
|
233
251
|
emptyRender: [Boolean, Object],
|
|
234
252
|
// 自定义列配置项
|
|
235
253
|
customConfig: Object,
|
|
236
|
-
|
|
254
|
+
/**
|
|
255
|
+
* (即将废弃)横向虚拟滚动配置项
|
|
256
|
+
* @deprecated
|
|
257
|
+
*/
|
|
237
258
|
scrollX: Object,
|
|
238
|
-
|
|
259
|
+
/**
|
|
260
|
+
* (即将废弃)纵向虚拟滚动配置项
|
|
261
|
+
* @deprecated
|
|
262
|
+
*/
|
|
239
263
|
scrollY: Object,
|
|
240
264
|
// 横向虚拟滚动配置项
|
|
241
265
|
virtualXConfig: Object,
|