vxe-table 3.10.4 → 3.10.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/es/grid/src/grid.js +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +130 -2
- package/es/table/module/custom/panel.js +327 -338
- package/es/table/module/export/export-panel.js +2 -2
- package/es/table/src/methods.js +25 -38
- package/es/table/style.css +42 -37
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +42 -37
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +387 -306
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +176 -2
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +182 -255
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/export-panel.js +2 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/src/methods.js +24 -44
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +42 -37
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +42 -37
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +1 -1
- package/packages/table/module/custom/mixin.ts +131 -2
- package/packages/table/module/custom/panel.ts +332 -337
- package/packages/table/module/export/export-panel.ts +2 -2
- package/packages/table/src/methods.ts +24 -37
- package/styles/components/table-module/custom.scss +21 -5
- /package/es/{iconfont.1730945625063.ttf → iconfont.1730978752470.ttf} +0 -0
- /package/es/{iconfont.1730945625063.woff → iconfont.1730978752470.woff} +0 -0
- /package/es/{iconfont.1730945625063.woff2 → iconfont.1730978752470.woff2} +0 -0
- /package/lib/{iconfont.1730945625063.ttf → iconfont.1730978752470.ttf} +0 -0
- /package/lib/{iconfont.1730945625063.woff → iconfont.1730978752470.woff} +0 -0
- /package/lib/{iconfont.1730945625063.woff2 → iconfont.1730978752470.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.10.
|
|
2223
|
+
const version = "3.10.6";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2768,7 +2768,7 @@ function isNodeElement(elem) {
|
|
|
2768
2768
|
const {
|
|
2769
2769
|
log: log_log
|
|
2770
2770
|
} = core_.VxeUI;
|
|
2771
|
-
const log_version = `table v${"3.10.
|
|
2771
|
+
const log_version = `table v${"3.10.6"}`;
|
|
2772
2772
|
const warnLog = log_log.create('warn', log_version);
|
|
2773
2773
|
const errLog = log_log.create('error', log_version);
|
|
2774
2774
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -6996,38 +6996,8 @@ const Methods = {
|
|
|
6996
6996
|
* 如果已关联工具栏,则会同步更新
|
|
6997
6997
|
*/
|
|
6998
6998
|
resetColumn(options) {
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
customOpts
|
|
7002
|
-
} = this;
|
|
7003
|
-
const {
|
|
7004
|
-
checkMethod
|
|
7005
|
-
} = customOpts;
|
|
7006
|
-
const opts = Object.assign({
|
|
7007
|
-
visible: true,
|
|
7008
|
-
resizable: options === true,
|
|
7009
|
-
fixed: options === true,
|
|
7010
|
-
sort: options === true
|
|
7011
|
-
}, options);
|
|
7012
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
7013
|
-
if (opts.resizable) {
|
|
7014
|
-
column.resizeWidth = 0;
|
|
7015
|
-
}
|
|
7016
|
-
if (opts.fixed) {
|
|
7017
|
-
column.fixed = column.defaultFixed;
|
|
7018
|
-
}
|
|
7019
|
-
if (opts.sort) {
|
|
7020
|
-
column.renderSortNumber = column.sortNumber;
|
|
7021
|
-
}
|
|
7022
|
-
if (!checkMethod || checkMethod({
|
|
7023
|
-
column
|
|
7024
|
-
})) {
|
|
7025
|
-
column.visible = column.defaultVisible;
|
|
7026
|
-
}
|
|
7027
|
-
column.renderResizeWidth = column.renderWidth;
|
|
7028
|
-
});
|
|
7029
|
-
this.saveCustomStore('reset');
|
|
7030
|
-
return this.handleCustom();
|
|
6999
|
+
warnLog('vxe.error.delFunc', ['resetColumn', 'resetCustom']);
|
|
7000
|
+
return this.resetCustom(options);
|
|
7031
7001
|
},
|
|
7032
7002
|
handleCustom() {
|
|
7033
7003
|
const {
|
|
@@ -10809,10 +10779,14 @@ const Methods = {
|
|
|
10809
10779
|
const {
|
|
10810
10780
|
rowExpandedMaps
|
|
10811
10781
|
} = this;
|
|
10812
|
-
rowRest
|
|
10782
|
+
if (rowRest) {
|
|
10783
|
+
rowRest.expandLoaded = true;
|
|
10784
|
+
}
|
|
10813
10785
|
rowExpandedMaps[rowid] = row;
|
|
10814
10786
|
}).catch(() => {
|
|
10815
|
-
rowRest
|
|
10787
|
+
if (rowRest) {
|
|
10788
|
+
rowRest.expandLoaded = false;
|
|
10789
|
+
}
|
|
10816
10790
|
}).finally(() => {
|
|
10817
10791
|
const {
|
|
10818
10792
|
rowExpandLazyLoadedMaps
|
|
@@ -11160,7 +11134,9 @@ const Methods = {
|
|
|
11160
11134
|
$table: $xeTable,
|
|
11161
11135
|
row
|
|
11162
11136
|
})).then(childRecords => {
|
|
11163
|
-
rowRest
|
|
11137
|
+
if (rowRest) {
|
|
11138
|
+
rowRest.treeLoaded = true;
|
|
11139
|
+
}
|
|
11164
11140
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11165
11141
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11166
11142
|
}
|
|
@@ -11190,7 +11166,9 @@ const Methods = {
|
|
|
11190
11166
|
const {
|
|
11191
11167
|
treeExpandLazyLoadedMaps
|
|
11192
11168
|
} = this;
|
|
11193
|
-
rowRest
|
|
11169
|
+
if (rowRest) {
|
|
11170
|
+
rowRest.treeLoaded = false;
|
|
11171
|
+
}
|
|
11194
11172
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11195
11173
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11196
11174
|
}
|
|
@@ -11282,13 +11260,15 @@ const Methods = {
|
|
|
11282
11260
|
const rowid = getRowid(this, row);
|
|
11283
11261
|
if (!treeTempExpandedMaps[rowid]) {
|
|
11284
11262
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11263
|
+
if (rowRest) {
|
|
11264
|
+
const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
|
|
11265
|
+
// 是否使用懒加载
|
|
11266
|
+
if (isLoad) {
|
|
11267
|
+
result.push(this.handleAsyncTreeExpandChilds(row));
|
|
11268
|
+
} else {
|
|
11269
|
+
if (row[childrenField] && row[childrenField].length) {
|
|
11270
|
+
treeTempExpandedMaps[rowid] = row;
|
|
11271
|
+
}
|
|
11292
11272
|
}
|
|
11293
11273
|
}
|
|
11294
11274
|
}
|
|
@@ -12215,7 +12195,7 @@ const Methods = {
|
|
|
12215
12195
|
}
|
|
12216
12196
|
};
|
|
12217
12197
|
// Module methods
|
|
12218
|
-
const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
|
|
12198
|
+
const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
12219
12199
|
funcs.forEach(name => {
|
|
12220
12200
|
Methods[name] = function (...args) {
|
|
12221
12201
|
if (true) {
|
|
@@ -14169,9 +14149,9 @@ function updateDropHint(_vm, evnt) {
|
|
|
14169
14149
|
}
|
|
14170
14150
|
const renderSimplePanel = (h, _vm) => {
|
|
14171
14151
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
14152
|
+
const $xeTable = _vm.$xeTable;
|
|
14172
14153
|
const {
|
|
14173
14154
|
_e,
|
|
14174
|
-
$xetable,
|
|
14175
14155
|
customStore,
|
|
14176
14156
|
dragColumn
|
|
14177
14157
|
} = _vm;
|
|
@@ -14179,7 +14159,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14179
14159
|
customColumnList,
|
|
14180
14160
|
customOpts,
|
|
14181
14161
|
isMaxFixedColumn
|
|
14182
|
-
} = $
|
|
14162
|
+
} = $xeTable;
|
|
14183
14163
|
const {
|
|
14184
14164
|
maxHeight
|
|
14185
14165
|
} = customStore;
|
|
@@ -14192,6 +14172,12 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14192
14172
|
trigger,
|
|
14193
14173
|
placement
|
|
14194
14174
|
} = customOpts;
|
|
14175
|
+
const slots = customOpts.slots || {};
|
|
14176
|
+
const headerSlot = slots.header;
|
|
14177
|
+
const topSlot = slots.top;
|
|
14178
|
+
const bottomSlot = slots.bottom;
|
|
14179
|
+
const defaultSlot = slots.default;
|
|
14180
|
+
const footerSlot = slots.footer;
|
|
14195
14181
|
const colVNs = [];
|
|
14196
14182
|
const customWrapperOns = {};
|
|
14197
14183
|
// hover 触发
|
|
@@ -14199,6 +14185,15 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14199
14185
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
14200
14186
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
14201
14187
|
}
|
|
14188
|
+
const isAllChecked = customStore.isAll;
|
|
14189
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14190
|
+
const params = {
|
|
14191
|
+
$table: $xeTable,
|
|
14192
|
+
$grid: $xeTable.xegrid,
|
|
14193
|
+
columns: customColumnList,
|
|
14194
|
+
isAllChecked,
|
|
14195
|
+
isAllIndeterminate
|
|
14196
|
+
};
|
|
14202
14197
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
14203
14198
|
const isVisible = visibleMethod ? visibleMethod({
|
|
14204
14199
|
column
|
|
@@ -14302,8 +14297,6 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14302
14297
|
})]) : _e()]));
|
|
14303
14298
|
}
|
|
14304
14299
|
});
|
|
14305
|
-
const isAllChecked = customStore.isAll;
|
|
14306
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14307
14300
|
return h('div', {
|
|
14308
14301
|
key: 'simple',
|
|
14309
14302
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
@@ -14312,8 +14305,10 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14312
14305
|
style: maxHeight && !['left', 'right'].includes(placement) ? {
|
|
14313
14306
|
maxHeight: `${maxHeight}px`
|
|
14314
14307
|
} : {}
|
|
14315
|
-
}, customStore.visible ? [h('
|
|
14308
|
+
}, customStore.visible ? [h('div', {
|
|
14316
14309
|
class: 'vxe-table-custom--header'
|
|
14310
|
+
}, headerSlot ? $xeTable.callSlot(headerSlot, params, h) : [h('ul', {
|
|
14311
|
+
class: 'vxe-table-custom--panel-list'
|
|
14317
14312
|
}, [h('li', {
|
|
14318
14313
|
class: 'vxe-table-custom--option'
|
|
14319
14314
|
}, [allowVisible ? h('div', {
|
|
@@ -14333,21 +14328,29 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14333
14328
|
class: 'vxe-checkbox--label'
|
|
14334
14329
|
}, panel_getI18n('vxe.toolbar.customAll'))]) : h('span', {
|
|
14335
14330
|
class: 'vxe-checkbox--label'
|
|
14336
|
-
}, panel_getI18n('vxe.table.customTitle'))])]), h('div', {
|
|
14331
|
+
}, panel_getI18n('vxe.table.customTitle'))])])]), h('div', {
|
|
14337
14332
|
ref: 'bodyElemRef',
|
|
14338
|
-
class: 'vxe-table-custom--
|
|
14339
|
-
}, [h('
|
|
14340
|
-
class: 'vxe-table-custom--
|
|
14333
|
+
class: 'vxe-table-custom--body'
|
|
14334
|
+
}, [topSlot ? h('div', {
|
|
14335
|
+
class: 'vxe-table-custom--panel-top'
|
|
14336
|
+
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), defaultSlot ? h('div', {
|
|
14337
|
+
class: 'vxe-table-custom--panel-body'
|
|
14338
|
+
}, $xeTable.callSlot(defaultSlot, params, h)) : h('transition-group', {
|
|
14339
|
+
class: 'vxe-table-custom--panel-list',
|
|
14341
14340
|
props: {
|
|
14342
14341
|
name: 'vxe-table-custom--list',
|
|
14343
14342
|
tag: 'ul'
|
|
14344
14343
|
},
|
|
14345
14344
|
on: customWrapperOns
|
|
14346
|
-
}, colVNs), h('div', {
|
|
14345
|
+
}, colVNs), bottomSlot ? h('div', {
|
|
14346
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
14347
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14347
14348
|
ref: 'dragHintElemRef',
|
|
14348
14349
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
14349
14350
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
|
|
14350
14351
|
class: 'vxe-table-custom--footer'
|
|
14352
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
14353
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
14351
14354
|
}, [h(VxeUIButtonComponent, {
|
|
14352
14355
|
props: {
|
|
14353
14356
|
mode: 'text',
|
|
@@ -14381,7 +14384,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14381
14384
|
on: {
|
|
14382
14385
|
click: _vm.confirmCustomEvent
|
|
14383
14386
|
}
|
|
14384
|
-
})]) : null] : []);
|
|
14387
|
+
})])]) : null] : []);
|
|
14385
14388
|
};
|
|
14386
14389
|
const renderPopupPanel = (h, _vm) => {
|
|
14387
14390
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
@@ -14389,9 +14392,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14389
14392
|
const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
14390
14393
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
14391
14394
|
const $xeTableCustomPanel = _vm;
|
|
14395
|
+
const $xeTable = _vm.$xeTable;
|
|
14392
14396
|
const {
|
|
14393
14397
|
_e,
|
|
14394
|
-
$xetable,
|
|
14395
14398
|
customStore
|
|
14396
14399
|
} = _vm;
|
|
14397
14400
|
const {
|
|
@@ -14399,7 +14402,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14399
14402
|
customColumnList,
|
|
14400
14403
|
columnOpts,
|
|
14401
14404
|
isMaxFixedColumn
|
|
14402
|
-
} = $
|
|
14405
|
+
} = $xeTable;
|
|
14403
14406
|
const {
|
|
14404
14407
|
modalOptions,
|
|
14405
14408
|
allowVisible,
|
|
@@ -14413,7 +14416,22 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14413
14416
|
maxFixedSize
|
|
14414
14417
|
} = columnOpts;
|
|
14415
14418
|
const modalOpts = Object.assign({}, modalOptions);
|
|
14419
|
+
const slots = customOpts.slots || {};
|
|
14420
|
+
const headerSlot = slots.header;
|
|
14421
|
+
const topSlot = slots.top;
|
|
14422
|
+
const bottomSlot = slots.bottom;
|
|
14423
|
+
const defaultSlot = slots.default;
|
|
14424
|
+
const footerSlot = slots.footer;
|
|
14416
14425
|
const trVNs = [];
|
|
14426
|
+
const isAllChecked = customStore.isAll;
|
|
14427
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14428
|
+
const params = {
|
|
14429
|
+
$table: $xeTable,
|
|
14430
|
+
$grid: $xeTable.xegrid,
|
|
14431
|
+
columns: customColumnList,
|
|
14432
|
+
isAllChecked,
|
|
14433
|
+
isAllIndeterminate
|
|
14434
|
+
};
|
|
14417
14435
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
14418
14436
|
const isVisible = visibleMethod ? visibleMethod({
|
|
14419
14437
|
column
|
|
@@ -14532,8 +14550,105 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14532
14550
|
})]) : _e()]));
|
|
14533
14551
|
}
|
|
14534
14552
|
});
|
|
14535
|
-
const
|
|
14536
|
-
|
|
14553
|
+
const scopedSlots = {
|
|
14554
|
+
default: () => {
|
|
14555
|
+
if (defaultSlot) {
|
|
14556
|
+
return $xeTable.callSlot(defaultSlot, params, h);
|
|
14557
|
+
}
|
|
14558
|
+
return h('div', {
|
|
14559
|
+
ref: 'bodyElemRef',
|
|
14560
|
+
class: 'vxe-table-custom-popup--body'
|
|
14561
|
+
}, [topSlot ? h('div', {
|
|
14562
|
+
class: 'vxe-table-custom-popup--table-top'
|
|
14563
|
+
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14564
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
14565
|
+
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
14566
|
+
class: 'vxe-table-custom-popup--table-col-seq'
|
|
14567
|
+
}) : _e(), allowSort ? h('col', {
|
|
14568
|
+
class: 'vxe-table-custom-popup--table-col-sort'
|
|
14569
|
+
}) : _e(), h('col', {
|
|
14570
|
+
class: 'vxe-table-custom-popup--table-col-title'
|
|
14571
|
+
}), allowResizable ? h('col', {
|
|
14572
|
+
class: 'vxe-table-custom-popup--table-col-width'
|
|
14573
|
+
}) : _e(), allowFixed ? h('col', {
|
|
14574
|
+
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
14575
|
+
}) : _e()]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
14576
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
14577
|
+
'is--checked': isAllChecked,
|
|
14578
|
+
'is--indeterminate': isAllIndeterminate
|
|
14579
|
+
}],
|
|
14580
|
+
attrs: {
|
|
14581
|
+
title: panel_getI18n('vxe.table.allTitle')
|
|
14582
|
+
},
|
|
14583
|
+
on: {
|
|
14584
|
+
click: _vm.allOptionEvent
|
|
14585
|
+
}
|
|
14586
|
+
}, [h('span', {
|
|
14587
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
14588
|
+
}), h('span', {
|
|
14589
|
+
class: 'vxe-checkbox--label'
|
|
14590
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : _e(), allowSort ? h('th', {}, [h('span', {
|
|
14591
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
14592
|
+
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
14593
|
+
props: {
|
|
14594
|
+
enterable: true,
|
|
14595
|
+
content: panel_getI18n('vxe.custom.setting.sortHelpTip'),
|
|
14596
|
+
popupClassName: 'vxe-table--ignore-clear'
|
|
14597
|
+
},
|
|
14598
|
+
scopedSlots: {
|
|
14599
|
+
default: () => {
|
|
14600
|
+
return h('i', {
|
|
14601
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
14602
|
+
});
|
|
14603
|
+
}
|
|
14604
|
+
}
|
|
14605
|
+
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : _e(), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : _e(), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : _e()])]), h('transition-group', {
|
|
14606
|
+
class: 'vxe-table-custom--panel-list',
|
|
14607
|
+
props: {
|
|
14608
|
+
tag: 'tbody',
|
|
14609
|
+
name: 'vxe-table-custom--list'
|
|
14610
|
+
}
|
|
14611
|
+
}, trVNs)])]), bottomSlot ? h('div', {
|
|
14612
|
+
class: 'vxe-table-custom-popup--table-bottom'
|
|
14613
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14614
|
+
ref: 'dragHintElemRef',
|
|
14615
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
14616
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))]);
|
|
14617
|
+
},
|
|
14618
|
+
footer: () => {
|
|
14619
|
+
if (footerSlot) {
|
|
14620
|
+
return $xeTable.callSlot(footerSlot, params, h);
|
|
14621
|
+
}
|
|
14622
|
+
return h('div', {
|
|
14623
|
+
class: 'vxe-table-custom-popup--footer'
|
|
14624
|
+
}, [h(VxeUIButtonComponent, {
|
|
14625
|
+
props: {
|
|
14626
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
14627
|
+
},
|
|
14628
|
+
on: {
|
|
14629
|
+
click: _vm.resetCustomEvent
|
|
14630
|
+
}
|
|
14631
|
+
}), h(VxeUIButtonComponent, {
|
|
14632
|
+
props: {
|
|
14633
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmCancel')
|
|
14634
|
+
},
|
|
14635
|
+
on: {
|
|
14636
|
+
click: _vm.cancelCustomEvent
|
|
14637
|
+
}
|
|
14638
|
+
}), h(VxeUIButtonComponent, {
|
|
14639
|
+
props: {
|
|
14640
|
+
status: 'primary',
|
|
14641
|
+
content: customOpts.confirmButtonText || panel_getI18n('vxe.custom.cstmConfirm')
|
|
14642
|
+
},
|
|
14643
|
+
on: {
|
|
14644
|
+
click: _vm.confirmCustomEvent
|
|
14645
|
+
}
|
|
14646
|
+
})]);
|
|
14647
|
+
}
|
|
14648
|
+
};
|
|
14649
|
+
if (headerSlot) {
|
|
14650
|
+
scopedSlots.header = () => $xeTable.callSlot(headerSlot, params, h);
|
|
14651
|
+
}
|
|
14537
14652
|
return VxeUIModalComponent ? h(VxeUIModalComponent, {
|
|
14538
14653
|
key: 'modal',
|
|
14539
14654
|
props: {
|
|
@@ -14544,10 +14659,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14544
14659
|
minWidth: modalOpts.minWidth || 700,
|
|
14545
14660
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
14546
14661
|
minHeight: modalOpts.minHeight || 400,
|
|
14547
|
-
showZoom:
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14662
|
+
showZoom: modalOpts.showZoom,
|
|
14663
|
+
showMaximize: modalOpts.showMaximize,
|
|
14664
|
+
showMinimize: modalOpts.showMinimize,
|
|
14665
|
+
mask: modalOpts.mask,
|
|
14666
|
+
lockView: modalOpts.lockView,
|
|
14667
|
+
resize: modalOpts.resize,
|
|
14551
14668
|
escClosable: !!modalOpts.escClosable,
|
|
14552
14669
|
destroyOnClose: true,
|
|
14553
14670
|
showFooter: true
|
|
@@ -14557,102 +14674,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14557
14674
|
customStore.visible = value;
|
|
14558
14675
|
}
|
|
14559
14676
|
},
|
|
14560
|
-
scopedSlots
|
|
14561
|
-
default: () => {
|
|
14562
|
-
return h('div', {
|
|
14563
|
-
ref: 'bodyElemRef',
|
|
14564
|
-
class: 'vxe-table-custom-popup--body'
|
|
14565
|
-
}, [h('div', {
|
|
14566
|
-
class: 'vxe-table-custom-popup--table-wrapper'
|
|
14567
|
-
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
14568
|
-
style: {
|
|
14569
|
-
width: '80px'
|
|
14570
|
-
}
|
|
14571
|
-
}) : _e(), allowSort ? h('col', {
|
|
14572
|
-
style: {
|
|
14573
|
-
width: '80px'
|
|
14574
|
-
}
|
|
14575
|
-
}) : _e(), h('col', {
|
|
14576
|
-
style: {
|
|
14577
|
-
minWidth: '120px'
|
|
14578
|
-
}
|
|
14579
|
-
}), allowResizable ? h('col', {
|
|
14580
|
-
style: {
|
|
14581
|
-
width: '140px'
|
|
14582
|
-
}
|
|
14583
|
-
}) : _e(), allowFixed ? h('col', {
|
|
14584
|
-
style: {
|
|
14585
|
-
width: '200px'
|
|
14586
|
-
}
|
|
14587
|
-
}) : _e()]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
14588
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
14589
|
-
'is--checked': isAllChecked,
|
|
14590
|
-
'is--indeterminate': isAllIndeterminate
|
|
14591
|
-
}],
|
|
14592
|
-
attrs: {
|
|
14593
|
-
title: panel_getI18n('vxe.table.allTitle')
|
|
14594
|
-
},
|
|
14595
|
-
on: {
|
|
14596
|
-
click: _vm.allOptionEvent
|
|
14597
|
-
}
|
|
14598
|
-
}, [h('span', {
|
|
14599
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
14600
|
-
}), h('span', {
|
|
14601
|
-
class: 'vxe-checkbox--label'
|
|
14602
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) : _e(), allowSort ? h('th', {}, [h('span', {
|
|
14603
|
-
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
14604
|
-
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
14605
|
-
props: {
|
|
14606
|
-
enterable: true,
|
|
14607
|
-
content: panel_getI18n('vxe.custom.setting.sortHelpTip'),
|
|
14608
|
-
popupClassName: 'vxe-table--ignore-clear'
|
|
14609
|
-
},
|
|
14610
|
-
scopedSlots: {
|
|
14611
|
-
default: () => {
|
|
14612
|
-
return h('i', {
|
|
14613
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
14614
|
-
});
|
|
14615
|
-
}
|
|
14616
|
-
}
|
|
14617
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : _e(), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : _e(), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : _e()])]), h('transition-group', {
|
|
14618
|
-
class: 'vxe-table-custom--body',
|
|
14619
|
-
props: {
|
|
14620
|
-
tag: 'tbody',
|
|
14621
|
-
name: 'vxe-table-custom--list'
|
|
14622
|
-
}
|
|
14623
|
-
}, trVNs)])]), h('div', {
|
|
14624
|
-
ref: 'dragHintElemRef',
|
|
14625
|
-
class: 'vxe-table-custom-popup--drag-hint'
|
|
14626
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))]);
|
|
14627
|
-
},
|
|
14628
|
-
footer: () => {
|
|
14629
|
-
return h('div', {
|
|
14630
|
-
class: 'vxe-table-custom-popup--footer'
|
|
14631
|
-
}, [h(VxeUIButtonComponent, {
|
|
14632
|
-
props: {
|
|
14633
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
14634
|
-
},
|
|
14635
|
-
on: {
|
|
14636
|
-
click: _vm.resetCustomEvent
|
|
14637
|
-
}
|
|
14638
|
-
}), h(VxeUIButtonComponent, {
|
|
14639
|
-
props: {
|
|
14640
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmCancel')
|
|
14641
|
-
},
|
|
14642
|
-
on: {
|
|
14643
|
-
click: _vm.cancelCustomEvent
|
|
14644
|
-
}
|
|
14645
|
-
}), h(VxeUIButtonComponent, {
|
|
14646
|
-
props: {
|
|
14647
|
-
status: 'primary',
|
|
14648
|
-
content: customOpts.confirmButtonText || panel_getI18n('vxe.custom.cstmConfirm')
|
|
14649
|
-
},
|
|
14650
|
-
on: {
|
|
14651
|
-
click: _vm.confirmCustomEvent
|
|
14652
|
-
}
|
|
14653
|
-
})]);
|
|
14654
|
-
}
|
|
14655
|
-
}
|
|
14677
|
+
scopedSlots
|
|
14656
14678
|
}) : panel_renderEmptyElement($xeTableCustomPanel);
|
|
14657
14679
|
};
|
|
14658
14680
|
/* harmony default export */ var panel = ({
|
|
@@ -14664,6 +14686,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14664
14686
|
}
|
|
14665
14687
|
},
|
|
14666
14688
|
inject: {
|
|
14689
|
+
$xeTable: {
|
|
14690
|
+
default: null
|
|
14691
|
+
},
|
|
14667
14692
|
$xetable: {
|
|
14668
14693
|
default: null
|
|
14669
14694
|
}
|
|
@@ -14742,114 +14767,41 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14742
14767
|
customStore.activeWrapper = false;
|
|
14743
14768
|
setTimeout(() => {
|
|
14744
14769
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
14745
|
-
$xetable.
|
|
14770
|
+
$xetable.customCloseEvent(evnt);
|
|
14746
14771
|
}
|
|
14747
14772
|
}, 300);
|
|
14748
14773
|
},
|
|
14749
14774
|
getStoreData() {
|
|
14750
14775
|
return {};
|
|
14751
14776
|
},
|
|
14752
|
-
confirmCustomEvent(
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
} = $xetable;
|
|
14760
|
-
const {
|
|
14761
|
-
allowVisible,
|
|
14762
|
-
allowSort,
|
|
14763
|
-
allowFixed,
|
|
14764
|
-
allowResizable
|
|
14765
|
-
} = customOpts;
|
|
14766
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
14767
|
-
if (parent) {
|
|
14768
|
-
// 更新子列信息
|
|
14769
|
-
column.fixed = parent.fixed;
|
|
14770
|
-
} else {
|
|
14771
|
-
if (allowSort) {
|
|
14772
|
-
const sortIndex = index + 1;
|
|
14773
|
-
column.renderSortNumber = sortIndex;
|
|
14774
|
-
}
|
|
14775
|
-
if (allowFixed) {
|
|
14776
|
-
column.fixed = column.renderFixed;
|
|
14777
|
-
}
|
|
14778
|
-
}
|
|
14779
|
-
if (allowResizable) {
|
|
14780
|
-
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
14781
|
-
if (column.renderResizeWidth !== column.renderWidth) {
|
|
14782
|
-
column.resizeWidth = column.renderResizeWidth;
|
|
14783
|
-
column.renderWidth = column.renderResizeWidth;
|
|
14784
|
-
}
|
|
14785
|
-
}
|
|
14786
|
-
}
|
|
14787
|
-
if (allowVisible) {
|
|
14788
|
-
column.visible = column.renderVisible;
|
|
14789
|
-
}
|
|
14790
|
-
});
|
|
14791
|
-
$xetable.closeCustom();
|
|
14792
|
-
$xetable.emitCustomEvent('confirm', evnt);
|
|
14793
|
-
$xetable.saveCustomStore('confirm');
|
|
14777
|
+
confirmCustomEvent({
|
|
14778
|
+
$event
|
|
14779
|
+
}) {
|
|
14780
|
+
const $xeTable = this.$xeTable;
|
|
14781
|
+
$xeTable.saveCustom();
|
|
14782
|
+
$xeTable.closeCustom();
|
|
14783
|
+
$xeTable.emitCustomEvent('confirm', $event);
|
|
14794
14784
|
},
|
|
14795
14785
|
cancelCloseEvent({
|
|
14796
14786
|
$event
|
|
14797
14787
|
}) {
|
|
14798
|
-
const
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
$xetable.closeCustom();
|
|
14802
|
-
$xetable.emitCustomEvent('cancel', $event);
|
|
14788
|
+
const $xeTable = this.$xeTable;
|
|
14789
|
+
$xeTable.closeCustom();
|
|
14790
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
14803
14791
|
},
|
|
14804
|
-
cancelCustomEvent(
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
customColumnList
|
|
14812
|
-
} = $xetable;
|
|
14813
|
-
const {
|
|
14814
|
-
oldSortMaps,
|
|
14815
|
-
oldFixedMaps,
|
|
14816
|
-
oldVisibleMaps
|
|
14817
|
-
} = customStore;
|
|
14818
|
-
const {
|
|
14819
|
-
allowVisible,
|
|
14820
|
-
allowSort,
|
|
14821
|
-
allowFixed,
|
|
14822
|
-
allowResizable
|
|
14823
|
-
} = customOpts;
|
|
14824
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
14825
|
-
const colid = column.getKey();
|
|
14826
|
-
const visible = !!oldVisibleMaps[colid];
|
|
14827
|
-
const fixed = oldFixedMaps[colid] || '';
|
|
14828
|
-
if (allowVisible) {
|
|
14829
|
-
column.renderVisible = visible;
|
|
14830
|
-
column.visible = visible;
|
|
14831
|
-
}
|
|
14832
|
-
if (allowFixed) {
|
|
14833
|
-
column.renderFixed = fixed;
|
|
14834
|
-
column.fixed = fixed;
|
|
14835
|
-
}
|
|
14836
|
-
if (allowSort) {
|
|
14837
|
-
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
14838
|
-
}
|
|
14839
|
-
if (allowResizable) {
|
|
14840
|
-
column.renderResizeWidth = column.renderWidth;
|
|
14841
|
-
}
|
|
14842
|
-
}, {
|
|
14843
|
-
children: 'children'
|
|
14844
|
-
});
|
|
14845
|
-
$xetable.closeCustom();
|
|
14846
|
-
$xetable.emitCustomEvent('cancel', evnt);
|
|
14792
|
+
cancelCustomEvent({
|
|
14793
|
+
$event
|
|
14794
|
+
}) {
|
|
14795
|
+
const $xeTable = this.$xeTable;
|
|
14796
|
+
$xeTable.cancelCustom();
|
|
14797
|
+
$xeTable.closeCustom();
|
|
14798
|
+
$xeTable.emitCustomEvent('cancel', $event);
|
|
14847
14799
|
},
|
|
14848
14800
|
handleResetCustomEvent(evnt) {
|
|
14849
14801
|
const {
|
|
14850
14802
|
$xetable
|
|
14851
14803
|
} = this;
|
|
14852
|
-
$xetable.
|
|
14804
|
+
$xetable.resetCustom(true);
|
|
14853
14805
|
$xetable.closeCustom();
|
|
14854
14806
|
$xetable.emitCustomEvent('reset', evnt);
|
|
14855
14807
|
},
|
|
@@ -14967,55 +14919,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14967
14919
|
},
|
|
14968
14920
|
allOptionEvent() {
|
|
14969
14921
|
const {
|
|
14970
|
-
$xetable
|
|
14971
|
-
customStore
|
|
14922
|
+
$xetable
|
|
14972
14923
|
} = this;
|
|
14973
|
-
|
|
14974
|
-
customColumnList,
|
|
14975
|
-
customOpts
|
|
14976
|
-
} = $xetable;
|
|
14977
|
-
const {
|
|
14978
|
-
checkMethod,
|
|
14979
|
-
visibleMethod
|
|
14980
|
-
} = customOpts;
|
|
14981
|
-
const isAll = !customStore.isAll;
|
|
14982
|
-
if (customOpts.immediate) {
|
|
14983
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
14984
|
-
if (visibleMethod && !visibleMethod({
|
|
14985
|
-
column
|
|
14986
|
-
})) {
|
|
14987
|
-
return;
|
|
14988
|
-
}
|
|
14989
|
-
if (checkMethod && !checkMethod({
|
|
14990
|
-
column
|
|
14991
|
-
})) {
|
|
14992
|
-
return;
|
|
14993
|
-
}
|
|
14994
|
-
column.visible = isAll;
|
|
14995
|
-
column.renderVisible = isAll;
|
|
14996
|
-
column.halfVisible = false;
|
|
14997
|
-
});
|
|
14998
|
-
customStore.isAll = isAll;
|
|
14999
|
-
$xetable.handleCustom();
|
|
15000
|
-
$xetable.saveCustomStore('update:visible');
|
|
15001
|
-
} else {
|
|
15002
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
15003
|
-
if (visibleMethod && !visibleMethod({
|
|
15004
|
-
column
|
|
15005
|
-
})) {
|
|
15006
|
-
return;
|
|
15007
|
-
}
|
|
15008
|
-
if (checkMethod && !checkMethod({
|
|
15009
|
-
column
|
|
15010
|
-
})) {
|
|
15011
|
-
return;
|
|
15012
|
-
}
|
|
15013
|
-
column.renderVisible = isAll;
|
|
15014
|
-
column.halfVisible = false;
|
|
15015
|
-
});
|
|
15016
|
-
customStore.isAll = isAll;
|
|
15017
|
-
}
|
|
15018
|
-
$xetable.checkCustomStatus();
|
|
14924
|
+
$xetable.toggleCustomAllCheckbox();
|
|
15019
14925
|
},
|
|
15020
14926
|
sortMousedownEvent(evnt) {
|
|
15021
14927
|
const {
|
|
@@ -15029,6 +14935,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15029
14935
|
trEl.draggable = true;
|
|
15030
14936
|
this.dragColumn = column;
|
|
15031
14937
|
addClass(trEl, 'active--drag-origin');
|
|
14938
|
+
updateDropHint(this, evnt);
|
|
15032
14939
|
},
|
|
15033
14940
|
sortMouseupEvent(evnt) {
|
|
15034
14941
|
const btnEl = evnt.currentTarget;
|
|
@@ -15861,7 +15768,7 @@ const {
|
|
|
15861
15768
|
class: 'vxe-table-export--panel-column-body'
|
|
15862
15769
|
}, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
|
|
15863
15770
|
class: 'vxe-table-export--panel-option-row'
|
|
15864
|
-
}, $xeTable.callSlot(parameterSlot, params))]) : h('td', [h('div', {
|
|
15771
|
+
}, $xeTable.callSlot(parameterSlot, params, h))]) : h('td', [h('div', {
|
|
15865
15772
|
class: 'vxe-table-export--panel-option-row'
|
|
15866
15773
|
}, [h('vxe-checkbox', {
|
|
15867
15774
|
props: {
|
|
@@ -15961,7 +15868,7 @@ const {
|
|
|
15961
15868
|
};
|
|
15962
15869
|
return h('div', {
|
|
15963
15870
|
class: 'vxe-table-export--panel-footer'
|
|
15964
|
-
}, footerSlot ? $xeTable.callSlot(footerSlot, params) : [h('div', {
|
|
15871
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
15965
15872
|
class: 'vxe-table-export--panel-btns'
|
|
15966
15873
|
}, [h('vxe-button', {
|
|
15967
15874
|
props: {
|
|
@@ -20739,6 +20646,180 @@ function validErrorRuleValue(rule, val) {
|
|
|
20739
20646
|
}
|
|
20740
20647
|
return this.$nextTick();
|
|
20741
20648
|
},
|
|
20649
|
+
_saveCustom() {
|
|
20650
|
+
const $xeTable = this;
|
|
20651
|
+
const {
|
|
20652
|
+
customOpts,
|
|
20653
|
+
customColumnList
|
|
20654
|
+
} = this;
|
|
20655
|
+
const {
|
|
20656
|
+
allowVisible,
|
|
20657
|
+
allowSort,
|
|
20658
|
+
allowFixed,
|
|
20659
|
+
allowResizable
|
|
20660
|
+
} = customOpts;
|
|
20661
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
20662
|
+
if (parent) {
|
|
20663
|
+
// 更新子列信息
|
|
20664
|
+
column.fixed = parent.fixed;
|
|
20665
|
+
} else {
|
|
20666
|
+
if (allowSort) {
|
|
20667
|
+
const sortIndex = index + 1;
|
|
20668
|
+
column.renderSortNumber = sortIndex;
|
|
20669
|
+
}
|
|
20670
|
+
if (allowFixed) {
|
|
20671
|
+
column.fixed = column.renderFixed;
|
|
20672
|
+
}
|
|
20673
|
+
}
|
|
20674
|
+
if (allowResizable) {
|
|
20675
|
+
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
20676
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
20677
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
20678
|
+
column.renderWidth = column.renderResizeWidth;
|
|
20679
|
+
}
|
|
20680
|
+
}
|
|
20681
|
+
}
|
|
20682
|
+
if (allowVisible) {
|
|
20683
|
+
column.visible = column.renderVisible;
|
|
20684
|
+
}
|
|
20685
|
+
});
|
|
20686
|
+
$xeTable.closeCustom();
|
|
20687
|
+
return $xeTable.saveCustomStore('confirm');
|
|
20688
|
+
},
|
|
20689
|
+
_cancelCustom() {
|
|
20690
|
+
const $xeTable = this;
|
|
20691
|
+
const {
|
|
20692
|
+
customStore,
|
|
20693
|
+
customOpts,
|
|
20694
|
+
customColumnList
|
|
20695
|
+
} = $xeTable;
|
|
20696
|
+
const {
|
|
20697
|
+
oldSortMaps,
|
|
20698
|
+
oldFixedMaps,
|
|
20699
|
+
oldVisibleMaps
|
|
20700
|
+
} = customStore;
|
|
20701
|
+
const {
|
|
20702
|
+
allowVisible,
|
|
20703
|
+
allowSort,
|
|
20704
|
+
allowFixed,
|
|
20705
|
+
allowResizable
|
|
20706
|
+
} = customOpts;
|
|
20707
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20708
|
+
const colid = column.getKey();
|
|
20709
|
+
const visible = !!oldVisibleMaps[colid];
|
|
20710
|
+
const fixed = oldFixedMaps[colid] || '';
|
|
20711
|
+
if (allowVisible) {
|
|
20712
|
+
column.renderVisible = visible;
|
|
20713
|
+
column.visible = visible;
|
|
20714
|
+
}
|
|
20715
|
+
if (allowFixed) {
|
|
20716
|
+
column.renderFixed = fixed;
|
|
20717
|
+
column.fixed = fixed;
|
|
20718
|
+
}
|
|
20719
|
+
if (allowSort) {
|
|
20720
|
+
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
20721
|
+
}
|
|
20722
|
+
if (allowResizable) {
|
|
20723
|
+
column.renderResizeWidth = column.renderWidth;
|
|
20724
|
+
}
|
|
20725
|
+
}, {
|
|
20726
|
+
children: 'children'
|
|
20727
|
+
});
|
|
20728
|
+
return $xeTable.$nextTick();
|
|
20729
|
+
},
|
|
20730
|
+
_resetCustom(options) {
|
|
20731
|
+
const {
|
|
20732
|
+
collectColumn,
|
|
20733
|
+
customOpts
|
|
20734
|
+
} = this;
|
|
20735
|
+
const {
|
|
20736
|
+
checkMethod
|
|
20737
|
+
} = customOpts;
|
|
20738
|
+
const opts = Object.assign({
|
|
20739
|
+
visible: true,
|
|
20740
|
+
resizable: options === true,
|
|
20741
|
+
fixed: options === true,
|
|
20742
|
+
sort: options === true
|
|
20743
|
+
}, options);
|
|
20744
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
20745
|
+
if (opts.resizable) {
|
|
20746
|
+
column.resizeWidth = 0;
|
|
20747
|
+
}
|
|
20748
|
+
if (opts.fixed) {
|
|
20749
|
+
column.fixed = column.defaultFixed;
|
|
20750
|
+
}
|
|
20751
|
+
if (opts.sort) {
|
|
20752
|
+
column.renderSortNumber = column.sortNumber;
|
|
20753
|
+
}
|
|
20754
|
+
if (!checkMethod || checkMethod({
|
|
20755
|
+
column
|
|
20756
|
+
})) {
|
|
20757
|
+
column.visible = column.defaultVisible;
|
|
20758
|
+
}
|
|
20759
|
+
column.renderResizeWidth = column.renderWidth;
|
|
20760
|
+
});
|
|
20761
|
+
this.saveCustomStore('reset');
|
|
20762
|
+
return this.handleCustom();
|
|
20763
|
+
},
|
|
20764
|
+
_toggleCustomAllCheckbox() {
|
|
20765
|
+
const {
|
|
20766
|
+
customStore
|
|
20767
|
+
} = this;
|
|
20768
|
+
const isAll = !customStore.isAll;
|
|
20769
|
+
return this.setCustomAllCheckbox(isAll);
|
|
20770
|
+
},
|
|
20771
|
+
_setCustomAllCheckbox(checked) {
|
|
20772
|
+
const $xeTable = this;
|
|
20773
|
+
const {
|
|
20774
|
+
customStore
|
|
20775
|
+
} = this;
|
|
20776
|
+
const {
|
|
20777
|
+
customColumnList,
|
|
20778
|
+
customOpts
|
|
20779
|
+
} = this;
|
|
20780
|
+
const {
|
|
20781
|
+
checkMethod,
|
|
20782
|
+
visibleMethod
|
|
20783
|
+
} = customOpts;
|
|
20784
|
+
const isAll = !!checked;
|
|
20785
|
+
if (customOpts.immediate) {
|
|
20786
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20787
|
+
if (visibleMethod && !visibleMethod({
|
|
20788
|
+
column
|
|
20789
|
+
})) {
|
|
20790
|
+
return;
|
|
20791
|
+
}
|
|
20792
|
+
if (checkMethod && !checkMethod({
|
|
20793
|
+
column
|
|
20794
|
+
})) {
|
|
20795
|
+
return;
|
|
20796
|
+
}
|
|
20797
|
+
column.visible = isAll;
|
|
20798
|
+
column.renderVisible = isAll;
|
|
20799
|
+
column.halfVisible = false;
|
|
20800
|
+
});
|
|
20801
|
+
customStore.isAll = isAll;
|
|
20802
|
+
$xeTable.handleCustom();
|
|
20803
|
+
$xeTable.saveCustomStore('update:visible');
|
|
20804
|
+
} else {
|
|
20805
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20806
|
+
if (visibleMethod && !visibleMethod({
|
|
20807
|
+
column
|
|
20808
|
+
})) {
|
|
20809
|
+
return;
|
|
20810
|
+
}
|
|
20811
|
+
if (checkMethod && !checkMethod({
|
|
20812
|
+
column
|
|
20813
|
+
})) {
|
|
20814
|
+
return;
|
|
20815
|
+
}
|
|
20816
|
+
column.renderVisible = isAll;
|
|
20817
|
+
column.halfVisible = false;
|
|
20818
|
+
});
|
|
20819
|
+
customStore.isAll = isAll;
|
|
20820
|
+
}
|
|
20821
|
+
$xeTable.checkCustomStatus();
|
|
20822
|
+
},
|
|
20742
20823
|
calcMaxHeight() {
|
|
20743
20824
|
const {
|
|
20744
20825
|
$el,
|
|
@@ -20749,7 +20830,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
20749
20830
|
if ($el) {
|
|
20750
20831
|
tableHeight = $el.clientHeight - 28;
|
|
20751
20832
|
}
|
|
20752
|
-
customStore.maxHeight = Math.max(
|
|
20833
|
+
customStore.maxHeight = Math.max(88, tableHeight);
|
|
20753
20834
|
},
|
|
20754
20835
|
checkCustomStatus() {
|
|
20755
20836
|
const {
|
|
@@ -20800,7 +20881,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
20800
20881
|
this.emitCustomEvent('open', evnt);
|
|
20801
20882
|
}
|
|
20802
20883
|
},
|
|
20803
|
-
|
|
20884
|
+
customCloseEvent(evnt) {
|
|
20804
20885
|
const {
|
|
20805
20886
|
customStore
|
|
20806
20887
|
} = this;
|
|
@@ -23753,7 +23834,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
23753
23834
|
this.openExport(btnParams);
|
|
23754
23835
|
break;
|
|
23755
23836
|
case 'reset_custom':
|
|
23756
|
-
this.
|
|
23837
|
+
this.resetCustom(true);
|
|
23757
23838
|
break;
|
|
23758
23839
|
case '_init':
|
|
23759
23840
|
case 'reload':
|