vxe-table 3.10.4 → 3.10.5
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 +9 -28
- 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 +372 -297
- 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 +9 -35
- 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 +9 -28
- package/styles/components/table-module/custom.scss +21 -5
- /package/es/{iconfont.1730945625063.ttf → iconfont.1730971767552.ttf} +0 -0
- /package/es/{iconfont.1730945625063.woff → iconfont.1730971767552.woff} +0 -0
- /package/es/{iconfont.1730945625063.woff2 → iconfont.1730971767552.woff2} +0 -0
- /package/lib/{iconfont.1730945625063.ttf → iconfont.1730971767552.ttf} +0 -0
- /package/lib/{iconfont.1730945625063.woff → iconfont.1730971767552.woff} +0 -0
- /package/lib/{iconfont.1730945625063.woff2 → iconfont.1730971767552.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.5";
|
|
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.5"}`;
|
|
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 {
|
|
@@ -11160,7 +11130,9 @@ const Methods = {
|
|
|
11160
11130
|
$table: $xeTable,
|
|
11161
11131
|
row
|
|
11162
11132
|
})).then(childRecords => {
|
|
11163
|
-
rowRest
|
|
11133
|
+
if (rowRest) {
|
|
11134
|
+
rowRest.treeLoaded = true;
|
|
11135
|
+
}
|
|
11164
11136
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11165
11137
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11166
11138
|
}
|
|
@@ -11190,7 +11162,9 @@ const Methods = {
|
|
|
11190
11162
|
const {
|
|
11191
11163
|
treeExpandLazyLoadedMaps
|
|
11192
11164
|
} = this;
|
|
11193
|
-
rowRest
|
|
11165
|
+
if (rowRest) {
|
|
11166
|
+
rowRest.treeLoaded = false;
|
|
11167
|
+
}
|
|
11194
11168
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11195
11169
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11196
11170
|
}
|
|
@@ -12215,7 +12189,7 @@ const Methods = {
|
|
|
12215
12189
|
}
|
|
12216
12190
|
};
|
|
12217
12191
|
// 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(',');
|
|
12192
|
+
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
12193
|
funcs.forEach(name => {
|
|
12220
12194
|
Methods[name] = function (...args) {
|
|
12221
12195
|
if (true) {
|
|
@@ -14169,9 +14143,9 @@ function updateDropHint(_vm, evnt) {
|
|
|
14169
14143
|
}
|
|
14170
14144
|
const renderSimplePanel = (h, _vm) => {
|
|
14171
14145
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
14146
|
+
const $xeTable = _vm.$xeTable;
|
|
14172
14147
|
const {
|
|
14173
14148
|
_e,
|
|
14174
|
-
$xetable,
|
|
14175
14149
|
customStore,
|
|
14176
14150
|
dragColumn
|
|
14177
14151
|
} = _vm;
|
|
@@ -14179,7 +14153,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14179
14153
|
customColumnList,
|
|
14180
14154
|
customOpts,
|
|
14181
14155
|
isMaxFixedColumn
|
|
14182
|
-
} = $
|
|
14156
|
+
} = $xeTable;
|
|
14183
14157
|
const {
|
|
14184
14158
|
maxHeight
|
|
14185
14159
|
} = customStore;
|
|
@@ -14192,6 +14166,12 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14192
14166
|
trigger,
|
|
14193
14167
|
placement
|
|
14194
14168
|
} = customOpts;
|
|
14169
|
+
const slots = customOpts.slots || {};
|
|
14170
|
+
const headerSlot = slots.header;
|
|
14171
|
+
const topSlot = slots.top;
|
|
14172
|
+
const bottomSlot = slots.bottom;
|
|
14173
|
+
const defaultSlot = slots.default;
|
|
14174
|
+
const footerSlot = slots.footer;
|
|
14195
14175
|
const colVNs = [];
|
|
14196
14176
|
const customWrapperOns = {};
|
|
14197
14177
|
// hover 触发
|
|
@@ -14199,6 +14179,15 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14199
14179
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
14200
14180
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
14201
14181
|
}
|
|
14182
|
+
const isAllChecked = customStore.isAll;
|
|
14183
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14184
|
+
const params = {
|
|
14185
|
+
$table: $xeTable,
|
|
14186
|
+
$grid: $xeTable.xegrid,
|
|
14187
|
+
columns: customColumnList,
|
|
14188
|
+
isAllChecked,
|
|
14189
|
+
isAllIndeterminate
|
|
14190
|
+
};
|
|
14202
14191
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
14203
14192
|
const isVisible = visibleMethod ? visibleMethod({
|
|
14204
14193
|
column
|
|
@@ -14302,8 +14291,6 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14302
14291
|
})]) : _e()]));
|
|
14303
14292
|
}
|
|
14304
14293
|
});
|
|
14305
|
-
const isAllChecked = customStore.isAll;
|
|
14306
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14307
14294
|
return h('div', {
|
|
14308
14295
|
key: 'simple',
|
|
14309
14296
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
@@ -14312,8 +14299,10 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14312
14299
|
style: maxHeight && !['left', 'right'].includes(placement) ? {
|
|
14313
14300
|
maxHeight: `${maxHeight}px`
|
|
14314
14301
|
} : {}
|
|
14315
|
-
}, customStore.visible ? [h('
|
|
14302
|
+
}, customStore.visible ? [h('div', {
|
|
14316
14303
|
class: 'vxe-table-custom--header'
|
|
14304
|
+
}, headerSlot ? $xeTable.callSlot(headerSlot, params, h) : [h('ul', {
|
|
14305
|
+
class: 'vxe-table-custom--panel-list'
|
|
14317
14306
|
}, [h('li', {
|
|
14318
14307
|
class: 'vxe-table-custom--option'
|
|
14319
14308
|
}, [allowVisible ? h('div', {
|
|
@@ -14333,21 +14322,29 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14333
14322
|
class: 'vxe-checkbox--label'
|
|
14334
14323
|
}, panel_getI18n('vxe.toolbar.customAll'))]) : h('span', {
|
|
14335
14324
|
class: 'vxe-checkbox--label'
|
|
14336
|
-
}, panel_getI18n('vxe.table.customTitle'))])]), h('div', {
|
|
14325
|
+
}, panel_getI18n('vxe.table.customTitle'))])])]), h('div', {
|
|
14337
14326
|
ref: 'bodyElemRef',
|
|
14338
|
-
class: 'vxe-table-custom--
|
|
14339
|
-
}, [h('
|
|
14340
|
-
class: 'vxe-table-custom--
|
|
14327
|
+
class: 'vxe-table-custom--body'
|
|
14328
|
+
}, [topSlot ? h('div', {
|
|
14329
|
+
class: 'vxe-table-custom--panel-top'
|
|
14330
|
+
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), defaultSlot ? h('div', {
|
|
14331
|
+
class: 'vxe-table-custom--panel-body'
|
|
14332
|
+
}, $xeTable.callSlot(defaultSlot, params, h)) : h('transition-group', {
|
|
14333
|
+
class: 'vxe-table-custom--panel-list',
|
|
14341
14334
|
props: {
|
|
14342
14335
|
name: 'vxe-table-custom--list',
|
|
14343
14336
|
tag: 'ul'
|
|
14344
14337
|
},
|
|
14345
14338
|
on: customWrapperOns
|
|
14346
|
-
}, colVNs), h('div', {
|
|
14339
|
+
}, colVNs), bottomSlot ? h('div', {
|
|
14340
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
14341
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14347
14342
|
ref: 'dragHintElemRef',
|
|
14348
14343
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
14349
14344
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
|
|
14350
14345
|
class: 'vxe-table-custom--footer'
|
|
14346
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
14347
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
14351
14348
|
}, [h(VxeUIButtonComponent, {
|
|
14352
14349
|
props: {
|
|
14353
14350
|
mode: 'text',
|
|
@@ -14381,7 +14378,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
14381
14378
|
on: {
|
|
14382
14379
|
click: _vm.confirmCustomEvent
|
|
14383
14380
|
}
|
|
14384
|
-
})]) : null] : []);
|
|
14381
|
+
})])]) : null] : []);
|
|
14385
14382
|
};
|
|
14386
14383
|
const renderPopupPanel = (h, _vm) => {
|
|
14387
14384
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
@@ -14389,9 +14386,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14389
14386
|
const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
14390
14387
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
14391
14388
|
const $xeTableCustomPanel = _vm;
|
|
14389
|
+
const $xeTable = _vm.$xeTable;
|
|
14392
14390
|
const {
|
|
14393
14391
|
_e,
|
|
14394
|
-
$xetable,
|
|
14395
14392
|
customStore
|
|
14396
14393
|
} = _vm;
|
|
14397
14394
|
const {
|
|
@@ -14399,7 +14396,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14399
14396
|
customColumnList,
|
|
14400
14397
|
columnOpts,
|
|
14401
14398
|
isMaxFixedColumn
|
|
14402
|
-
} = $
|
|
14399
|
+
} = $xeTable;
|
|
14403
14400
|
const {
|
|
14404
14401
|
modalOptions,
|
|
14405
14402
|
allowVisible,
|
|
@@ -14413,7 +14410,22 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14413
14410
|
maxFixedSize
|
|
14414
14411
|
} = columnOpts;
|
|
14415
14412
|
const modalOpts = Object.assign({}, modalOptions);
|
|
14413
|
+
const slots = customOpts.slots || {};
|
|
14414
|
+
const headerSlot = slots.header;
|
|
14415
|
+
const topSlot = slots.top;
|
|
14416
|
+
const bottomSlot = slots.bottom;
|
|
14417
|
+
const defaultSlot = slots.default;
|
|
14418
|
+
const footerSlot = slots.footer;
|
|
14416
14419
|
const trVNs = [];
|
|
14420
|
+
const isAllChecked = customStore.isAll;
|
|
14421
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
14422
|
+
const params = {
|
|
14423
|
+
$table: $xeTable,
|
|
14424
|
+
$grid: $xeTable.xegrid,
|
|
14425
|
+
columns: customColumnList,
|
|
14426
|
+
isAllChecked,
|
|
14427
|
+
isAllIndeterminate
|
|
14428
|
+
};
|
|
14417
14429
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
14418
14430
|
const isVisible = visibleMethod ? visibleMethod({
|
|
14419
14431
|
column
|
|
@@ -14532,8 +14544,105 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14532
14544
|
})]) : _e()]));
|
|
14533
14545
|
}
|
|
14534
14546
|
});
|
|
14535
|
-
const
|
|
14536
|
-
|
|
14547
|
+
const scopedSlots = {
|
|
14548
|
+
default: () => {
|
|
14549
|
+
if (defaultSlot) {
|
|
14550
|
+
return $xeTable.callSlot(defaultSlot, params, h);
|
|
14551
|
+
}
|
|
14552
|
+
return h('div', {
|
|
14553
|
+
ref: 'bodyElemRef',
|
|
14554
|
+
class: 'vxe-table-custom-popup--body'
|
|
14555
|
+
}, [topSlot ? h('div', {
|
|
14556
|
+
class: 'vxe-table-custom-popup--table-top'
|
|
14557
|
+
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14558
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
14559
|
+
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
14560
|
+
class: 'vxe-table-custom-popup--table-col-seq'
|
|
14561
|
+
}) : _e(), allowSort ? h('col', {
|
|
14562
|
+
class: 'vxe-table-custom-popup--table-col-sort'
|
|
14563
|
+
}) : _e(), h('col', {
|
|
14564
|
+
class: 'vxe-table-custom-popup--table-col-title'
|
|
14565
|
+
}), allowResizable ? h('col', {
|
|
14566
|
+
class: 'vxe-table-custom-popup--table-col-width'
|
|
14567
|
+
}) : _e(), allowFixed ? h('col', {
|
|
14568
|
+
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
14569
|
+
}) : _e()]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
14570
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
14571
|
+
'is--checked': isAllChecked,
|
|
14572
|
+
'is--indeterminate': isAllIndeterminate
|
|
14573
|
+
}],
|
|
14574
|
+
attrs: {
|
|
14575
|
+
title: panel_getI18n('vxe.table.allTitle')
|
|
14576
|
+
},
|
|
14577
|
+
on: {
|
|
14578
|
+
click: _vm.allOptionEvent
|
|
14579
|
+
}
|
|
14580
|
+
}, [h('span', {
|
|
14581
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
14582
|
+
}), h('span', {
|
|
14583
|
+
class: 'vxe-checkbox--label'
|
|
14584
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : _e(), allowSort ? h('th', {}, [h('span', {
|
|
14585
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
14586
|
+
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
14587
|
+
props: {
|
|
14588
|
+
enterable: true,
|
|
14589
|
+
content: panel_getI18n('vxe.custom.setting.sortHelpTip'),
|
|
14590
|
+
popupClassName: 'vxe-table--ignore-clear'
|
|
14591
|
+
},
|
|
14592
|
+
scopedSlots: {
|
|
14593
|
+
default: () => {
|
|
14594
|
+
return h('i', {
|
|
14595
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
14596
|
+
});
|
|
14597
|
+
}
|
|
14598
|
+
}
|
|
14599
|
+
}) : 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', {
|
|
14600
|
+
class: 'vxe-table-custom--panel-list',
|
|
14601
|
+
props: {
|
|
14602
|
+
tag: 'tbody',
|
|
14603
|
+
name: 'vxe-table-custom--list'
|
|
14604
|
+
}
|
|
14605
|
+
}, trVNs)])]), bottomSlot ? h('div', {
|
|
14606
|
+
class: 'vxe-table-custom-popup--table-bottom'
|
|
14607
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
14608
|
+
ref: 'dragHintElemRef',
|
|
14609
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
14610
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))]);
|
|
14611
|
+
},
|
|
14612
|
+
footer: () => {
|
|
14613
|
+
if (footerSlot) {
|
|
14614
|
+
return $xeTable.callSlot(footerSlot, params, h);
|
|
14615
|
+
}
|
|
14616
|
+
return h('div', {
|
|
14617
|
+
class: 'vxe-table-custom-popup--footer'
|
|
14618
|
+
}, [h(VxeUIButtonComponent, {
|
|
14619
|
+
props: {
|
|
14620
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
14621
|
+
},
|
|
14622
|
+
on: {
|
|
14623
|
+
click: _vm.resetCustomEvent
|
|
14624
|
+
}
|
|
14625
|
+
}), h(VxeUIButtonComponent, {
|
|
14626
|
+
props: {
|
|
14627
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmCancel')
|
|
14628
|
+
},
|
|
14629
|
+
on: {
|
|
14630
|
+
click: _vm.cancelCustomEvent
|
|
14631
|
+
}
|
|
14632
|
+
}), h(VxeUIButtonComponent, {
|
|
14633
|
+
props: {
|
|
14634
|
+
status: 'primary',
|
|
14635
|
+
content: customOpts.confirmButtonText || panel_getI18n('vxe.custom.cstmConfirm')
|
|
14636
|
+
},
|
|
14637
|
+
on: {
|
|
14638
|
+
click: _vm.confirmCustomEvent
|
|
14639
|
+
}
|
|
14640
|
+
})]);
|
|
14641
|
+
}
|
|
14642
|
+
};
|
|
14643
|
+
if (headerSlot) {
|
|
14644
|
+
scopedSlots.header = () => $xeTable.callSlot(headerSlot, params, h);
|
|
14645
|
+
}
|
|
14537
14646
|
return VxeUIModalComponent ? h(VxeUIModalComponent, {
|
|
14538
14647
|
key: 'modal',
|
|
14539
14648
|
props: {
|
|
@@ -14544,10 +14653,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14544
14653
|
minWidth: modalOpts.minWidth || 700,
|
|
14545
14654
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
14546
14655
|
minHeight: modalOpts.minHeight || 400,
|
|
14547
|
-
showZoom:
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14656
|
+
showZoom: modalOpts.showZoom,
|
|
14657
|
+
showMaximize: modalOpts.showMaximize,
|
|
14658
|
+
showMinimize: modalOpts.showMinimize,
|
|
14659
|
+
mask: modalOpts.mask,
|
|
14660
|
+
lockView: modalOpts.lockView,
|
|
14661
|
+
resize: modalOpts.resize,
|
|
14551
14662
|
escClosable: !!modalOpts.escClosable,
|
|
14552
14663
|
destroyOnClose: true,
|
|
14553
14664
|
showFooter: true
|
|
@@ -14557,102 +14668,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14557
14668
|
customStore.visible = value;
|
|
14558
14669
|
}
|
|
14559
14670
|
},
|
|
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
|
-
}
|
|
14671
|
+
scopedSlots
|
|
14656
14672
|
}) : panel_renderEmptyElement($xeTableCustomPanel);
|
|
14657
14673
|
};
|
|
14658
14674
|
/* harmony default export */ var panel = ({
|
|
@@ -14664,6 +14680,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14664
14680
|
}
|
|
14665
14681
|
},
|
|
14666
14682
|
inject: {
|
|
14683
|
+
$xeTable: {
|
|
14684
|
+
default: null
|
|
14685
|
+
},
|
|
14667
14686
|
$xetable: {
|
|
14668
14687
|
default: null
|
|
14669
14688
|
}
|
|
@@ -14742,114 +14761,41 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14742
14761
|
customStore.activeWrapper = false;
|
|
14743
14762
|
setTimeout(() => {
|
|
14744
14763
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
14745
|
-
$xetable.
|
|
14764
|
+
$xetable.customCloseEvent(evnt);
|
|
14746
14765
|
}
|
|
14747
14766
|
}, 300);
|
|
14748
14767
|
},
|
|
14749
14768
|
getStoreData() {
|
|
14750
14769
|
return {};
|
|
14751
14770
|
},
|
|
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');
|
|
14771
|
+
confirmCustomEvent({
|
|
14772
|
+
$event
|
|
14773
|
+
}) {
|
|
14774
|
+
const $xeTable = this.$xeTable;
|
|
14775
|
+
$xeTable.saveCustom();
|
|
14776
|
+
$xeTable.closeCustom();
|
|
14777
|
+
$xeTable.emitCustomEvent('confirm', $event);
|
|
14794
14778
|
},
|
|
14795
14779
|
cancelCloseEvent({
|
|
14796
14780
|
$event
|
|
14797
14781
|
}) {
|
|
14798
|
-
const
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
$xetable.closeCustom();
|
|
14802
|
-
$xetable.emitCustomEvent('cancel', $event);
|
|
14782
|
+
const $xeTable = this.$xeTable;
|
|
14783
|
+
$xeTable.closeCustom();
|
|
14784
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
14803
14785
|
},
|
|
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);
|
|
14786
|
+
cancelCustomEvent({
|
|
14787
|
+
$event
|
|
14788
|
+
}) {
|
|
14789
|
+
const $xeTable = this.$xeTable;
|
|
14790
|
+
$xeTable.cancelCustom();
|
|
14791
|
+
$xeTable.closeCustom();
|
|
14792
|
+
$xeTable.emitCustomEvent('cancel', $event);
|
|
14847
14793
|
},
|
|
14848
14794
|
handleResetCustomEvent(evnt) {
|
|
14849
14795
|
const {
|
|
14850
14796
|
$xetable
|
|
14851
14797
|
} = this;
|
|
14852
|
-
$xetable.
|
|
14798
|
+
$xetable.resetCustom(true);
|
|
14853
14799
|
$xetable.closeCustom();
|
|
14854
14800
|
$xetable.emitCustomEvent('reset', evnt);
|
|
14855
14801
|
},
|
|
@@ -14967,55 +14913,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14967
14913
|
},
|
|
14968
14914
|
allOptionEvent() {
|
|
14969
14915
|
const {
|
|
14970
|
-
$xetable
|
|
14971
|
-
customStore
|
|
14916
|
+
$xetable
|
|
14972
14917
|
} = 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();
|
|
14918
|
+
$xetable.toggleCustomAllCheckbox();
|
|
15019
14919
|
},
|
|
15020
14920
|
sortMousedownEvent(evnt) {
|
|
15021
14921
|
const {
|
|
@@ -15029,6 +14929,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15029
14929
|
trEl.draggable = true;
|
|
15030
14930
|
this.dragColumn = column;
|
|
15031
14931
|
addClass(trEl, 'active--drag-origin');
|
|
14932
|
+
updateDropHint(this, evnt);
|
|
15032
14933
|
},
|
|
15033
14934
|
sortMouseupEvent(evnt) {
|
|
15034
14935
|
const btnEl = evnt.currentTarget;
|
|
@@ -15861,7 +15762,7 @@ const {
|
|
|
15861
15762
|
class: 'vxe-table-export--panel-column-body'
|
|
15862
15763
|
}, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
|
|
15863
15764
|
class: 'vxe-table-export--panel-option-row'
|
|
15864
|
-
}, $xeTable.callSlot(parameterSlot, params))]) : h('td', [h('div', {
|
|
15765
|
+
}, $xeTable.callSlot(parameterSlot, params, h))]) : h('td', [h('div', {
|
|
15865
15766
|
class: 'vxe-table-export--panel-option-row'
|
|
15866
15767
|
}, [h('vxe-checkbox', {
|
|
15867
15768
|
props: {
|
|
@@ -15961,7 +15862,7 @@ const {
|
|
|
15961
15862
|
};
|
|
15962
15863
|
return h('div', {
|
|
15963
15864
|
class: 'vxe-table-export--panel-footer'
|
|
15964
|
-
}, footerSlot ? $xeTable.callSlot(footerSlot, params) : [h('div', {
|
|
15865
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
15965
15866
|
class: 'vxe-table-export--panel-btns'
|
|
15966
15867
|
}, [h('vxe-button', {
|
|
15967
15868
|
props: {
|
|
@@ -20739,6 +20640,180 @@ function validErrorRuleValue(rule, val) {
|
|
|
20739
20640
|
}
|
|
20740
20641
|
return this.$nextTick();
|
|
20741
20642
|
},
|
|
20643
|
+
_saveCustom() {
|
|
20644
|
+
const $xeTable = this;
|
|
20645
|
+
const {
|
|
20646
|
+
customOpts,
|
|
20647
|
+
customColumnList
|
|
20648
|
+
} = this;
|
|
20649
|
+
const {
|
|
20650
|
+
allowVisible,
|
|
20651
|
+
allowSort,
|
|
20652
|
+
allowFixed,
|
|
20653
|
+
allowResizable
|
|
20654
|
+
} = customOpts;
|
|
20655
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
20656
|
+
if (parent) {
|
|
20657
|
+
// 更新子列信息
|
|
20658
|
+
column.fixed = parent.fixed;
|
|
20659
|
+
} else {
|
|
20660
|
+
if (allowSort) {
|
|
20661
|
+
const sortIndex = index + 1;
|
|
20662
|
+
column.renderSortNumber = sortIndex;
|
|
20663
|
+
}
|
|
20664
|
+
if (allowFixed) {
|
|
20665
|
+
column.fixed = column.renderFixed;
|
|
20666
|
+
}
|
|
20667
|
+
}
|
|
20668
|
+
if (allowResizable) {
|
|
20669
|
+
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
20670
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
20671
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
20672
|
+
column.renderWidth = column.renderResizeWidth;
|
|
20673
|
+
}
|
|
20674
|
+
}
|
|
20675
|
+
}
|
|
20676
|
+
if (allowVisible) {
|
|
20677
|
+
column.visible = column.renderVisible;
|
|
20678
|
+
}
|
|
20679
|
+
});
|
|
20680
|
+
$xeTable.closeCustom();
|
|
20681
|
+
return $xeTable.saveCustomStore('confirm');
|
|
20682
|
+
},
|
|
20683
|
+
_cancelCustom() {
|
|
20684
|
+
const $xeTable = this;
|
|
20685
|
+
const {
|
|
20686
|
+
customStore,
|
|
20687
|
+
customOpts,
|
|
20688
|
+
customColumnList
|
|
20689
|
+
} = $xeTable;
|
|
20690
|
+
const {
|
|
20691
|
+
oldSortMaps,
|
|
20692
|
+
oldFixedMaps,
|
|
20693
|
+
oldVisibleMaps
|
|
20694
|
+
} = customStore;
|
|
20695
|
+
const {
|
|
20696
|
+
allowVisible,
|
|
20697
|
+
allowSort,
|
|
20698
|
+
allowFixed,
|
|
20699
|
+
allowResizable
|
|
20700
|
+
} = customOpts;
|
|
20701
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20702
|
+
const colid = column.getKey();
|
|
20703
|
+
const visible = !!oldVisibleMaps[colid];
|
|
20704
|
+
const fixed = oldFixedMaps[colid] || '';
|
|
20705
|
+
if (allowVisible) {
|
|
20706
|
+
column.renderVisible = visible;
|
|
20707
|
+
column.visible = visible;
|
|
20708
|
+
}
|
|
20709
|
+
if (allowFixed) {
|
|
20710
|
+
column.renderFixed = fixed;
|
|
20711
|
+
column.fixed = fixed;
|
|
20712
|
+
}
|
|
20713
|
+
if (allowSort) {
|
|
20714
|
+
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
20715
|
+
}
|
|
20716
|
+
if (allowResizable) {
|
|
20717
|
+
column.renderResizeWidth = column.renderWidth;
|
|
20718
|
+
}
|
|
20719
|
+
}, {
|
|
20720
|
+
children: 'children'
|
|
20721
|
+
});
|
|
20722
|
+
return $xeTable.$nextTick();
|
|
20723
|
+
},
|
|
20724
|
+
_resetCustom(options) {
|
|
20725
|
+
const {
|
|
20726
|
+
collectColumn,
|
|
20727
|
+
customOpts
|
|
20728
|
+
} = this;
|
|
20729
|
+
const {
|
|
20730
|
+
checkMethod
|
|
20731
|
+
} = customOpts;
|
|
20732
|
+
const opts = Object.assign({
|
|
20733
|
+
visible: true,
|
|
20734
|
+
resizable: options === true,
|
|
20735
|
+
fixed: options === true,
|
|
20736
|
+
sort: options === true
|
|
20737
|
+
}, options);
|
|
20738
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
20739
|
+
if (opts.resizable) {
|
|
20740
|
+
column.resizeWidth = 0;
|
|
20741
|
+
}
|
|
20742
|
+
if (opts.fixed) {
|
|
20743
|
+
column.fixed = column.defaultFixed;
|
|
20744
|
+
}
|
|
20745
|
+
if (opts.sort) {
|
|
20746
|
+
column.renderSortNumber = column.sortNumber;
|
|
20747
|
+
}
|
|
20748
|
+
if (!checkMethod || checkMethod({
|
|
20749
|
+
column
|
|
20750
|
+
})) {
|
|
20751
|
+
column.visible = column.defaultVisible;
|
|
20752
|
+
}
|
|
20753
|
+
column.renderResizeWidth = column.renderWidth;
|
|
20754
|
+
});
|
|
20755
|
+
this.saveCustomStore('reset');
|
|
20756
|
+
return this.handleCustom();
|
|
20757
|
+
},
|
|
20758
|
+
_toggleCustomAllCheckbox() {
|
|
20759
|
+
const {
|
|
20760
|
+
customStore
|
|
20761
|
+
} = this;
|
|
20762
|
+
const isAll = !customStore.isAll;
|
|
20763
|
+
return this.setCustomAllCheckbox(isAll);
|
|
20764
|
+
},
|
|
20765
|
+
_setCustomAllCheckbox(checked) {
|
|
20766
|
+
const $xeTable = this;
|
|
20767
|
+
const {
|
|
20768
|
+
customStore
|
|
20769
|
+
} = this;
|
|
20770
|
+
const {
|
|
20771
|
+
customColumnList,
|
|
20772
|
+
customOpts
|
|
20773
|
+
} = this;
|
|
20774
|
+
const {
|
|
20775
|
+
checkMethod,
|
|
20776
|
+
visibleMethod
|
|
20777
|
+
} = customOpts;
|
|
20778
|
+
const isAll = !!checked;
|
|
20779
|
+
if (customOpts.immediate) {
|
|
20780
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20781
|
+
if (visibleMethod && !visibleMethod({
|
|
20782
|
+
column
|
|
20783
|
+
})) {
|
|
20784
|
+
return;
|
|
20785
|
+
}
|
|
20786
|
+
if (checkMethod && !checkMethod({
|
|
20787
|
+
column
|
|
20788
|
+
})) {
|
|
20789
|
+
return;
|
|
20790
|
+
}
|
|
20791
|
+
column.visible = isAll;
|
|
20792
|
+
column.renderVisible = isAll;
|
|
20793
|
+
column.halfVisible = false;
|
|
20794
|
+
});
|
|
20795
|
+
customStore.isAll = isAll;
|
|
20796
|
+
$xeTable.handleCustom();
|
|
20797
|
+
$xeTable.saveCustomStore('update:visible');
|
|
20798
|
+
} else {
|
|
20799
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20800
|
+
if (visibleMethod && !visibleMethod({
|
|
20801
|
+
column
|
|
20802
|
+
})) {
|
|
20803
|
+
return;
|
|
20804
|
+
}
|
|
20805
|
+
if (checkMethod && !checkMethod({
|
|
20806
|
+
column
|
|
20807
|
+
})) {
|
|
20808
|
+
return;
|
|
20809
|
+
}
|
|
20810
|
+
column.renderVisible = isAll;
|
|
20811
|
+
column.halfVisible = false;
|
|
20812
|
+
});
|
|
20813
|
+
customStore.isAll = isAll;
|
|
20814
|
+
}
|
|
20815
|
+
$xeTable.checkCustomStatus();
|
|
20816
|
+
},
|
|
20742
20817
|
calcMaxHeight() {
|
|
20743
20818
|
const {
|
|
20744
20819
|
$el,
|
|
@@ -20749,7 +20824,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
20749
20824
|
if ($el) {
|
|
20750
20825
|
tableHeight = $el.clientHeight - 28;
|
|
20751
20826
|
}
|
|
20752
|
-
customStore.maxHeight = Math.max(
|
|
20827
|
+
customStore.maxHeight = Math.max(88, tableHeight);
|
|
20753
20828
|
},
|
|
20754
20829
|
checkCustomStatus() {
|
|
20755
20830
|
const {
|
|
@@ -20800,7 +20875,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
20800
20875
|
this.emitCustomEvent('open', evnt);
|
|
20801
20876
|
}
|
|
20802
20877
|
},
|
|
20803
|
-
|
|
20878
|
+
customCloseEvent(evnt) {
|
|
20804
20879
|
const {
|
|
20805
20880
|
customStore
|
|
20806
20881
|
} = this;
|
|
@@ -23753,7 +23828,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
23753
23828
|
this.openExport(btnParams);
|
|
23754
23829
|
break;
|
|
23755
23830
|
case 'reset_custom':
|
|
23756
|
-
this.
|
|
23831
|
+
this.resetCustom(true);
|
|
23757
23832
|
break;
|
|
23758
23833
|
case '_init':
|
|
23759
23834
|
case 'reload':
|