vxe-table 4.11.21 → 4.11.23
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/style.css +1 -1
- package/es/table/src/cell.js +10 -9
- package/es/table/src/table.js +28 -32
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +46 -42
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +15 -8
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +29 -32
- package/lib/table/src/table.min.js +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/package.json +2 -2
- package/packages/table/src/cell.ts +10 -9
- package/packages/table/src/table.ts +28 -32
- /package/es/{iconfont.1741744105265.ttf → iconfont.1741921400827.ttf} +0 -0
- /package/es/{iconfont.1741744105265.woff → iconfont.1741921400827.woff} +0 -0
- /package/es/{iconfont.1741744105265.woff2 → iconfont.1741921400827.woff2} +0 -0
- /package/lib/{iconfont.1741744105265.ttf → iconfont.1741921400827.ttf} +0 -0
- /package/lib/{iconfont.1741744105265.woff → iconfont.1741921400827.woff} +0 -0
- /package/lib/{iconfont.1741744105265.woff2 → iconfont.1741921400827.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -548,7 +548,8 @@ export const Cell = {
|
|
|
548
548
|
const headerSlot = slots ? slots.header : null;
|
|
549
549
|
const titleSlot = slots ? slots.title : null;
|
|
550
550
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
551
|
-
const headerTitle =
|
|
551
|
+
const { checkStrictly, showHeader, headerTitle } = checkboxOpts;
|
|
552
|
+
const colTitle = column.getTitle();
|
|
552
553
|
const ons = {};
|
|
553
554
|
if (!isHidden) {
|
|
554
555
|
ons.onClick = (evnt) => {
|
|
@@ -561,11 +562,11 @@ export const Cell = {
|
|
|
561
562
|
if (headerSlot) {
|
|
562
563
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
563
564
|
}
|
|
564
|
-
if (
|
|
565
|
+
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
565
566
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
566
567
|
h('span', {
|
|
567
568
|
class: 'vxe-checkbox--label'
|
|
568
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) :
|
|
569
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
|
|
569
570
|
]));
|
|
570
571
|
}
|
|
571
572
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
@@ -573,15 +574,15 @@ export const Cell = {
|
|
|
573
574
|
'is--checked': isAllCheckboxSelected,
|
|
574
575
|
'is--disabled': isAllCheckboxDisabled,
|
|
575
576
|
'is--indeterminate': isAllCheckboxIndeterminate
|
|
576
|
-
}], title: getI18n('vxe.table.allTitle') }, ons), [
|
|
577
|
+
}], title: XEUtils.eqNull(headerTitle) ? getI18n('vxe.table.allTitle') : `${headerTitle || ''}` }, ons), [
|
|
577
578
|
h('span', {
|
|
578
579
|
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
579
580
|
})
|
|
580
|
-
].concat(titleSlot ||
|
|
581
|
+
].concat(titleSlot || colTitle
|
|
581
582
|
? [
|
|
582
583
|
h('span', {
|
|
583
584
|
class: 'vxe-checkbox--label'
|
|
584
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) :
|
|
585
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
|
|
585
586
|
]
|
|
586
587
|
: []))
|
|
587
588
|
]));
|
|
@@ -809,7 +810,7 @@ export const Cell = {
|
|
|
809
810
|
const { $table, column } = params;
|
|
810
811
|
const { computeSortOpts } = $table.getComputeMaps();
|
|
811
812
|
const sortOpts = computeSortOpts.value;
|
|
812
|
-
const { showIcon, allowBtn, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
813
|
+
const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
813
814
|
const { order } = column;
|
|
814
815
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
815
816
|
return [
|
|
@@ -820,7 +821,7 @@ export const Cell = {
|
|
|
820
821
|
class: ['vxe-sort--asc-btn', iconAsc || getIcon().TABLE_SORT_ASC, {
|
|
821
822
|
'sort--active': order === 'asc'
|
|
822
823
|
}],
|
|
823
|
-
title: getI18n('vxe.table.sortAsc')
|
|
824
|
+
title: XEUtils.eqNull(ascTitle) ? getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`,
|
|
824
825
|
onClick: allowBtn
|
|
825
826
|
? (evnt) => {
|
|
826
827
|
evnt.stopPropagation();
|
|
@@ -832,7 +833,7 @@ export const Cell = {
|
|
|
832
833
|
class: ['vxe-sort--desc-btn', iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
833
834
|
'sort--active': order === 'desc'
|
|
834
835
|
}],
|
|
835
|
-
title: getI18n('vxe.table.sortDesc')
|
|
836
|
+
title: XEUtils.eqNull(descTitle) ? getI18n('vxe.table.sortDesc') : `${descTitle || ''}`,
|
|
836
837
|
onClick: allowBtn
|
|
837
838
|
? (evnt) => {
|
|
838
839
|
evnt.stopPropagation();
|
package/es/table/src/table.js
CHANGED
|
@@ -1174,7 +1174,7 @@ export default defineComponent({
|
|
|
1174
1174
|
}
|
|
1175
1175
|
else {
|
|
1176
1176
|
if ((storage && !type) || (columnOpts.drag && (isCrossDrag || isSelfToChildDrag))) {
|
|
1177
|
-
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field
|
|
1177
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
if (!hasFixed && fixed) {
|
|
@@ -5758,7 +5758,13 @@ export default defineComponent({
|
|
|
5758
5758
|
const { id } = props;
|
|
5759
5759
|
const customOpts = computeCustomOpts.value;
|
|
5760
5760
|
const { collectColumn } = internalData;
|
|
5761
|
-
const { checkMethod } = customOpts;
|
|
5761
|
+
const { storage, checkMethod } = customOpts;
|
|
5762
|
+
const isAllCustom = storage === true;
|
|
5763
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
5764
|
+
const isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
5765
|
+
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
5766
|
+
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
5767
|
+
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
5762
5768
|
const resizableData = {};
|
|
5763
5769
|
const sortData = {};
|
|
5764
5770
|
const visibleData = {};
|
|
@@ -5778,44 +5784,34 @@ export default defineComponent({
|
|
|
5778
5784
|
let hasFixed = 0;
|
|
5779
5785
|
let hasVisible = 0;
|
|
5780
5786
|
XEUtils.eachTree(collectColumn, (column, index, items, path, parentColumn) => {
|
|
5787
|
+
const colKey = column.getKey();
|
|
5788
|
+
if (!colKey) {
|
|
5789
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
|
|
5790
|
+
return;
|
|
5791
|
+
}
|
|
5781
5792
|
// 只支持一级
|
|
5782
5793
|
if (!parentColumn) {
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
hasSort = 1;
|
|
5787
|
-
sortData[colKey] = column.renderSortNumber;
|
|
5788
|
-
}
|
|
5789
|
-
});
|
|
5790
|
-
if (column.fixed !== column.defaultFixed) {
|
|
5791
|
-
const colKey = column.getKey();
|
|
5792
|
-
if (colKey) {
|
|
5793
|
-
hasFixed = 1;
|
|
5794
|
-
fixedData[colKey] = column.fixed;
|
|
5795
|
-
}
|
|
5794
|
+
if (isCustomSort) {
|
|
5795
|
+
hasSort = 1;
|
|
5796
|
+
sortData[colKey] = column.renderSortNumber;
|
|
5796
5797
|
}
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
if (colKey) {
|
|
5801
|
-
hasResizable = 1;
|
|
5802
|
-
resizableData[colKey] = column.renderWidth;
|
|
5798
|
+
if (isCustomFixed && column.fixed !== column.defaultFixed) {
|
|
5799
|
+
hasFixed = 1;
|
|
5800
|
+
fixedData[colKey] = column.fixed;
|
|
5803
5801
|
}
|
|
5804
5802
|
}
|
|
5805
|
-
if (
|
|
5803
|
+
if (isCustomResizable && column.resizeWidth) {
|
|
5804
|
+
hasResizable = 1;
|
|
5805
|
+
resizableData[colKey] = column.renderWidth;
|
|
5806
|
+
}
|
|
5807
|
+
if (isCustomVisible && (!checkMethod || checkMethod({ column }))) {
|
|
5806
5808
|
if (!column.visible && column.defaultVisible) {
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
hasVisible = 1;
|
|
5810
|
-
visibleData[colKey] = false;
|
|
5811
|
-
}
|
|
5809
|
+
hasVisible = 1;
|
|
5810
|
+
visibleData[colKey] = false;
|
|
5812
5811
|
}
|
|
5813
5812
|
else if (column.visible && !column.defaultVisible) {
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
hasVisible = 1;
|
|
5817
|
-
visibleData[colKey] = true;
|
|
5818
|
-
}
|
|
5813
|
+
hasVisible = 1;
|
|
5814
|
+
visibleData[colKey] = true;
|
|
5819
5815
|
}
|
|
5820
5816
|
}
|
|
5821
5817
|
});
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3051,7 +3051,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3051
3051
|
;// ./packages/ui/index.ts
|
|
3052
3052
|
|
|
3053
3053
|
|
|
3054
|
-
const version = "4.11.
|
|
3054
|
+
const version = "4.11.23";
|
|
3055
3055
|
core_.VxeUI.version = version;
|
|
3056
3056
|
core_.VxeUI.tableVersion = version;
|
|
3057
3057
|
core_.VxeUI.setConfig({
|
|
@@ -3499,7 +3499,7 @@ var es_iterator_some = __webpack_require__(3579);
|
|
|
3499
3499
|
const {
|
|
3500
3500
|
log: log_log
|
|
3501
3501
|
} = core_.VxeUI;
|
|
3502
|
-
const log_version = `table v${"4.11.
|
|
3502
|
+
const log_version = `table v${"4.11.23"}`;
|
|
3503
3503
|
const warnLog = log_log.create('warn', log_version);
|
|
3504
3504
|
const errLog = log_log.create('error', log_version);
|
|
3505
3505
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -5267,7 +5267,12 @@ const Cell = {
|
|
|
5267
5267
|
const headerSlot = slots ? slots.header : null;
|
|
5268
5268
|
const titleSlot = slots ? slots.title : null;
|
|
5269
5269
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
5270
|
-
const
|
|
5270
|
+
const {
|
|
5271
|
+
checkStrictly,
|
|
5272
|
+
showHeader,
|
|
5273
|
+
headerTitle
|
|
5274
|
+
} = checkboxOpts;
|
|
5275
|
+
const colTitle = column.getTitle();
|
|
5271
5276
|
const ons = {};
|
|
5272
5277
|
if (!isHidden) {
|
|
5273
5278
|
ons.onClick = evnt => {
|
|
@@ -5285,10 +5290,10 @@ const Cell = {
|
|
|
5285
5290
|
if (headerSlot) {
|
|
5286
5291
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
5287
5292
|
}
|
|
5288
|
-
if (
|
|
5293
|
+
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
5289
5294
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5290
5295
|
class: 'vxe-checkbox--label'
|
|
5291
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) :
|
|
5296
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)]));
|
|
5292
5297
|
}
|
|
5293
5298
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5294
5299
|
class: ['vxe-cell--checkbox', {
|
|
@@ -5296,13 +5301,13 @@ const Cell = {
|
|
|
5296
5301
|
'is--disabled': isAllCheckboxDisabled,
|
|
5297
5302
|
'is--indeterminate': isAllCheckboxIndeterminate
|
|
5298
5303
|
}],
|
|
5299
|
-
title: cell_getI18n('vxe.table.allTitle')
|
|
5304
|
+
title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(headerTitle) ? cell_getI18n('vxe.table.allTitle') : `${headerTitle || ''}`,
|
|
5300
5305
|
...ons
|
|
5301
5306
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5302
5307
|
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
5303
|
-
})].concat(titleSlot ||
|
|
5308
|
+
})].concat(titleSlot || colTitle ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5304
5309
|
class: 'vxe-checkbox--label'
|
|
5305
|
-
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) :
|
|
5310
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)] : []))]));
|
|
5306
5311
|
},
|
|
5307
5312
|
renderCheckboxCell(params) {
|
|
5308
5313
|
const {
|
|
@@ -5613,6 +5618,8 @@ const Cell = {
|
|
|
5613
5618
|
const {
|
|
5614
5619
|
showIcon,
|
|
5615
5620
|
allowBtn,
|
|
5621
|
+
ascTitle,
|
|
5622
|
+
descTitle,
|
|
5616
5623
|
iconLayout,
|
|
5617
5624
|
iconAsc,
|
|
5618
5625
|
iconDesc,
|
|
@@ -5628,7 +5635,7 @@ const Cell = {
|
|
|
5628
5635
|
class: ['vxe-sort--asc-btn', iconAsc || cell_getIcon().TABLE_SORT_ASC, {
|
|
5629
5636
|
'sort--active': order === 'asc'
|
|
5630
5637
|
}],
|
|
5631
|
-
title: cell_getI18n('vxe.table.sortAsc')
|
|
5638
|
+
title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(ascTitle) ? cell_getI18n('vxe.table.sortAsc') : `${ascTitle || ''}`,
|
|
5632
5639
|
onClick: allowBtn ? evnt => {
|
|
5633
5640
|
evnt.stopPropagation();
|
|
5634
5641
|
$table.triggerSortEvent(evnt, column, 'asc');
|
|
@@ -5637,7 +5644,7 @@ const Cell = {
|
|
|
5637
5644
|
class: ['vxe-sort--desc-btn', iconDesc || cell_getIcon().TABLE_SORT_DESC, {
|
|
5638
5645
|
'sort--active': order === 'desc'
|
|
5639
5646
|
}],
|
|
5640
|
-
title: cell_getI18n('vxe.table.sortDesc')
|
|
5647
|
+
title: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(descTitle) ? cell_getI18n('vxe.table.sortDesc') : `${descTitle || ''}`,
|
|
5641
5648
|
onClick: allowBtn ? evnt => {
|
|
5642
5649
|
evnt.stopPropagation();
|
|
5643
5650
|
$table.triggerSortEvent(evnt, column, 'desc');
|
|
@@ -11591,7 +11598,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11591
11598
|
fullColumnFieldData[field] = rest;
|
|
11592
11599
|
} else {
|
|
11593
11600
|
if (storage && !type || columnOpts.drag && (isCrossDrag || isSelfToChildDrag)) {
|
|
11594
|
-
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field
|
|
11601
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field=?`]);
|
|
11595
11602
|
}
|
|
11596
11603
|
}
|
|
11597
11604
|
if (!hasFixed && fixed) {
|
|
@@ -16942,8 +16949,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16942
16949
|
collectColumn
|
|
16943
16950
|
} = internalData;
|
|
16944
16951
|
const {
|
|
16952
|
+
storage,
|
|
16945
16953
|
checkMethod
|
|
16946
16954
|
} = customOpts;
|
|
16955
|
+
const isAllCustom = storage === true;
|
|
16956
|
+
const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
16957
|
+
const isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
16958
|
+
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
16959
|
+
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
16960
|
+
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
16947
16961
|
const resizableData = {};
|
|
16948
16962
|
const sortData = {};
|
|
16949
16963
|
const visibleData = {};
|
|
@@ -16963,45 +16977,35 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16963
16977
|
let hasFixed = 0;
|
|
16964
16978
|
let hasVisible = 0;
|
|
16965
16979
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parentColumn) => {
|
|
16980
|
+
const colKey = column.getKey();
|
|
16981
|
+
if (!colKey) {
|
|
16982
|
+
errLog('vxe.error.reqProp', [`${column.getTitle() || column.type || ''} -> column.field=?`]);
|
|
16983
|
+
return;
|
|
16984
|
+
}
|
|
16966
16985
|
// 只支持一级
|
|
16967
16986
|
if (!parentColumn) {
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
hasSort = 1;
|
|
16972
|
-
sortData[colKey] = column.renderSortNumber;
|
|
16973
|
-
}
|
|
16974
|
-
});
|
|
16975
|
-
if (column.fixed !== column.defaultFixed) {
|
|
16976
|
-
const colKey = column.getKey();
|
|
16977
|
-
if (colKey) {
|
|
16978
|
-
hasFixed = 1;
|
|
16979
|
-
fixedData[colKey] = column.fixed;
|
|
16980
|
-
}
|
|
16987
|
+
if (isCustomSort) {
|
|
16988
|
+
hasSort = 1;
|
|
16989
|
+
sortData[colKey] = column.renderSortNumber;
|
|
16981
16990
|
}
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
if (colKey) {
|
|
16986
|
-
hasResizable = 1;
|
|
16987
|
-
resizableData[colKey] = column.renderWidth;
|
|
16991
|
+
if (isCustomFixed && column.fixed !== column.defaultFixed) {
|
|
16992
|
+
hasFixed = 1;
|
|
16993
|
+
fixedData[colKey] = column.fixed;
|
|
16988
16994
|
}
|
|
16989
16995
|
}
|
|
16990
|
-
if (
|
|
16996
|
+
if (isCustomResizable && column.resizeWidth) {
|
|
16997
|
+
hasResizable = 1;
|
|
16998
|
+
resizableData[colKey] = column.renderWidth;
|
|
16999
|
+
}
|
|
17000
|
+
if (isCustomVisible && (!checkMethod || checkMethod({
|
|
16991
17001
|
column
|
|
16992
|
-
})) {
|
|
17002
|
+
}))) {
|
|
16993
17003
|
if (!column.visible && column.defaultVisible) {
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
hasVisible = 1;
|
|
16997
|
-
visibleData[colKey] = false;
|
|
16998
|
-
}
|
|
17004
|
+
hasVisible = 1;
|
|
17005
|
+
visibleData[colKey] = false;
|
|
16999
17006
|
} else if (column.visible && !column.defaultVisible) {
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
hasVisible = 1;
|
|
17003
|
-
visibleData[colKey] = true;
|
|
17004
|
-
}
|
|
17007
|
+
hasVisible = 1;
|
|
17008
|
+
visibleData[colKey] = true;
|
|
17005
17009
|
}
|
|
17006
17010
|
}
|
|
17007
17011
|
});
|