vxe-table 3.9.13 → 3.9.15
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/module/custom/panel.js +28 -20
- package/es/table/src/body.js +1 -1
- package/es/table/src/footer.js +6 -2
- package/es/table/src/header.js +6 -2
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +57 -28
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +33 -20
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +10 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +10 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/module/custom/panel.ts +28 -20
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/footer.ts +7 -2
- package/packages/table/src/header.ts +7 -2
- /package/es/{iconfont.1729323982580.ttf → iconfont.1729564455642.ttf} +0 -0
- /package/es/{iconfont.1729323982580.woff → iconfont.1729564455642.woff} +0 -0
- /package/es/{iconfont.1729323982580.woff2 → iconfont.1729564455642.woff2} +0 -0
- /package/lib/{iconfont.1729323982580.ttf → iconfont.1729564455642.ttf} +0 -0
- /package/lib/{iconfont.1729323982580.woff → iconfont.1729564455642.woff} +0 -0
- /package/lib/{iconfont.1729323982580.woff2 → iconfont.1729564455642.woff2} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
+
import { VxeUI } from '../../ui';
|
|
2
3
|
import { getClass } from '../../ui/src/utils';
|
|
3
4
|
import { getOffsetPos, hasClass, addClass, removeClass } from '../../ui/src/dom';
|
|
4
5
|
import { convertHeaderColumnToRows, getColReMinWidth } from './util';
|
|
6
|
+
const { renderer } = VxeUI;
|
|
5
7
|
const cellType = 'header';
|
|
6
8
|
export default {
|
|
7
9
|
name: 'VxeTableHeader',
|
|
@@ -118,13 +120,15 @@ export default {
|
|
|
118
120
|
class: ['vxe-header--row', headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName({ $table: $xetable, $rowIndex, fixed: fixedType, type: cellType }) : headerRowClassName : ''],
|
|
119
121
|
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle({ $table: $xetable, $rowIndex, fixed: fixedType, type: cellType }) : headerRowStyle) : null
|
|
120
122
|
}, cols.map((column, $columnIndex) => {
|
|
121
|
-
const { type, showHeaderOverflow, headerAlign, align, headerClassName } = column;
|
|
123
|
+
const { type, showHeaderOverflow, headerAlign, align, headerClassName, editRender, cellRender } = column;
|
|
122
124
|
// const { enabled } = tooltipOpts
|
|
123
125
|
const colid = column.id;
|
|
126
|
+
const renderOpts = editRender || cellRender;
|
|
127
|
+
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
124
128
|
const isColGroup = column.children && column.children.length;
|
|
125
129
|
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
126
130
|
const headOverflow = XEUtils.isUndefined(showHeaderOverflow) || XEUtils.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
127
|
-
const headAlign = headerAlign ||
|
|
131
|
+
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
128
132
|
let showEllipsis = headOverflow === 'ellipsis';
|
|
129
133
|
const showTitle = headOverflow === 'title';
|
|
130
134
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
package/es/ui/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "3.9.
|
|
3
|
+
export const version = "3.9.15";
|
|
4
4
|
VxeUI.version = version;
|
|
5
|
-
VxeUI.tableVersion = "3.9.
|
|
5
|
+
VxeUI.tableVersion = "3.9.15";
|
|
6
6
|
VxeUI.setConfig({
|
|
7
7
|
emptyCell: ' ',
|
|
8
8
|
table: {
|
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2220,9 +2220,9 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.9.
|
|
2223
|
+
const version = "3.9.15";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
|
-
core_.VxeUI.tableVersion = "3.9.
|
|
2225
|
+
core_.VxeUI.tableVersion = "3.9.15";
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
2227
2227
|
emptyCell: ' ',
|
|
2228
2228
|
table: {
|
|
@@ -2764,7 +2764,7 @@ function isNodeElement(elem) {
|
|
|
2764
2764
|
const {
|
|
2765
2765
|
log: log_log
|
|
2766
2766
|
} = core_.VxeUI;
|
|
2767
|
-
const log_version = `table v${"3.9.
|
|
2767
|
+
const log_version = `table v${"3.9.15"}`;
|
|
2768
2768
|
const warnLog = log_log.create('warn', log_version);
|
|
2769
2769
|
const errLog = log_log.create('error', log_version);
|
|
2770
2770
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -11754,7 +11754,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
11754
11754
|
let hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
11755
11755
|
let isDirty;
|
|
11756
11756
|
const tdOns = {};
|
|
11757
|
-
const cellAlign = align || allAlign;
|
|
11757
|
+
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
11758
11758
|
const errorValidItem = validErrorMaps[`${rowid}:${column.id}`];
|
|
11759
11759
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? height || tableData.length > 1 : validOpts.message === 'inline');
|
|
11760
11760
|
const attrs = {
|
|
@@ -12578,6 +12578,10 @@ function syncBodyScroll(_vm, fixedType, scrollTop, elem1, elem2) {
|
|
|
12578
12578
|
|
|
12579
12579
|
|
|
12580
12580
|
|
|
12581
|
+
|
|
12582
|
+
const {
|
|
12583
|
+
renderer: header_renderer
|
|
12584
|
+
} = core_.VxeUI;
|
|
12581
12585
|
const cellType = 'header';
|
|
12582
12586
|
/* harmony default export */ var header = ({
|
|
12583
12587
|
name: 'VxeTableHeader',
|
|
@@ -12742,14 +12746,18 @@ const cellType = 'header';
|
|
|
12742
12746
|
showHeaderOverflow,
|
|
12743
12747
|
headerAlign,
|
|
12744
12748
|
align,
|
|
12745
|
-
headerClassName
|
|
12749
|
+
headerClassName,
|
|
12750
|
+
editRender,
|
|
12751
|
+
cellRender
|
|
12746
12752
|
} = column;
|
|
12747
12753
|
// const { enabled } = tooltipOpts
|
|
12748
12754
|
const colid = column.id;
|
|
12755
|
+
const renderOpts = editRender || cellRender;
|
|
12756
|
+
const compConf = renderOpts ? header_renderer.get(renderOpts.name) : null;
|
|
12749
12757
|
const isColGroup = column.children && column.children.length;
|
|
12750
12758
|
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
12751
12759
|
const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
12752
|
-
const headAlign = headerAlign ||
|
|
12760
|
+
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
12753
12761
|
let showEllipsis = headOverflow === 'ellipsis';
|
|
12754
12762
|
const showTitle = headOverflow === 'title';
|
|
12755
12763
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
@@ -12947,7 +12955,11 @@ const cellType = 'header';
|
|
|
12947
12955
|
|
|
12948
12956
|
|
|
12949
12957
|
|
|
12958
|
+
|
|
12950
12959
|
const footer_cellType = 'footer';
|
|
12960
|
+
const {
|
|
12961
|
+
renderer: footer_renderer
|
|
12962
|
+
} = core_.VxeUI;
|
|
12951
12963
|
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
12952
12964
|
for (let mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
12953
12965
|
const {
|
|
@@ -13119,13 +13131,17 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
13119
13131
|
showFooterOverflow,
|
|
13120
13132
|
footerAlign,
|
|
13121
13133
|
align,
|
|
13122
|
-
footerClassName
|
|
13134
|
+
footerClassName,
|
|
13135
|
+
editRender,
|
|
13136
|
+
cellRender
|
|
13123
13137
|
} = column;
|
|
13138
|
+
const renderOpts = editRender || cellRender;
|
|
13139
|
+
const compConf = renderOpts ? footer_renderer.get(renderOpts.name) : null;
|
|
13124
13140
|
const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
|
|
13125
13141
|
const isColGroup = column.children && column.children.length;
|
|
13126
13142
|
const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX;
|
|
13127
13143
|
const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showFooterOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
|
|
13128
|
-
const footAlign = footerAlign ||
|
|
13144
|
+
const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
13129
13145
|
let showEllipsis = footOverflow === 'ellipsis';
|
|
13130
13146
|
const showTitle = footOverflow === 'title';
|
|
13131
13147
|
const showTooltip = footOverflow === true || footOverflow === 'tooltip';
|
|
@@ -13629,7 +13645,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
13629
13645
|
colid: column.id
|
|
13630
13646
|
},
|
|
13631
13647
|
class: ['vxe-table-custom--option', `level--${column.level}`, {
|
|
13632
|
-
'is--hidden': isHidden,
|
|
13648
|
+
'is--hidden': isDisabled || isHidden,
|
|
13633
13649
|
'is--group': isColGroup
|
|
13634
13650
|
}],
|
|
13635
13651
|
on: {
|
|
@@ -13659,12 +13675,12 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
13659
13675
|
class: 'vxe-table-custom--sort-option'
|
|
13660
13676
|
}, [h('span', {
|
|
13661
13677
|
class: ['vxe-table-custom--sort-btn', {
|
|
13662
|
-
'is--disabled': isHidden
|
|
13678
|
+
'is--disabled': isDisabled || isHidden
|
|
13663
13679
|
}],
|
|
13664
13680
|
attrs: {
|
|
13665
13681
|
title: panel_getI18n('vxe.custom.setting.sortHelpTip')
|
|
13666
13682
|
},
|
|
13667
|
-
on: isHidden ? {} : {
|
|
13683
|
+
on: isDisabled || isHidden ? {} : {
|
|
13668
13684
|
mousedown: _vm.sortMousedownEvent,
|
|
13669
13685
|
mouseup: _vm.sortMouseupEvent
|
|
13670
13686
|
}
|
|
@@ -13689,7 +13705,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
13689
13705
|
mode: 'text',
|
|
13690
13706
|
icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
13691
13707
|
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
13692
|
-
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
13708
|
+
disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
13693
13709
|
title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
13694
13710
|
},
|
|
13695
13711
|
on: {
|
|
@@ -13702,7 +13718,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
13702
13718
|
mode: 'text',
|
|
13703
13719
|
icon: column.renderFixed === 'right' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
13704
13720
|
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
13705
|
-
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
13721
|
+
disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
13706
13722
|
title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
13707
13723
|
},
|
|
13708
13724
|
on: {
|
|
@@ -13875,12 +13891,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
13875
13891
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
13876
13892
|
}, [column.level === 1 ? h('span', {
|
|
13877
13893
|
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
13878
|
-
'is--disabled': isHidden
|
|
13894
|
+
'is--disabled': isDisabled || isHidden
|
|
13879
13895
|
}],
|
|
13880
13896
|
attrs: {
|
|
13881
13897
|
title: panel_getI18n('vxe.custom.setting.sortHelpTip')
|
|
13882
13898
|
},
|
|
13883
|
-
on: isHidden ? {} : {
|
|
13899
|
+
on: isDisabled || isHidden ? {} : {
|
|
13884
13900
|
mousedown: _vm.sortMousedownEvent,
|
|
13885
13901
|
mouseup: _vm.sortMouseupEvent
|
|
13886
13902
|
}
|
|
@@ -13905,7 +13921,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
13905
13921
|
}, [column.children && column.children.length ? h('span', '-') : VxeUIInputComponent ? h(VxeUIInputComponent, {
|
|
13906
13922
|
props: {
|
|
13907
13923
|
type: 'integer',
|
|
13908
|
-
disabled: isHidden,
|
|
13924
|
+
disabled: isDisabled || isHidden,
|
|
13909
13925
|
value: column.renderResizeWidth
|
|
13910
13926
|
},
|
|
13911
13927
|
on: {
|
|
@@ -13920,19 +13936,19 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
13920
13936
|
value: column.renderFixed || '',
|
|
13921
13937
|
type: 'button',
|
|
13922
13938
|
size: 'mini',
|
|
13923
|
-
disabled: isHidden,
|
|
13939
|
+
disabled: isDisabled || isHidden,
|
|
13924
13940
|
options: [{
|
|
13925
13941
|
label: panel_getI18n('vxe.custom.setting.fixedLeft'),
|
|
13926
13942
|
value: 'left',
|
|
13927
|
-
disabled: isHidden || isMaxFixedColumn
|
|
13943
|
+
disabled: isDisabled || isHidden || isMaxFixedColumn
|
|
13928
13944
|
}, {
|
|
13929
13945
|
label: panel_getI18n('vxe.custom.setting.fixedUnset'),
|
|
13930
13946
|
value: '',
|
|
13931
|
-
disabled: isHidden
|
|
13947
|
+
disabled: isDisabled || isHidden
|
|
13932
13948
|
}, {
|
|
13933
13949
|
label: panel_getI18n('vxe.custom.setting.fixedRight'),
|
|
13934
13950
|
value: 'right',
|
|
13935
|
-
disabled: isHidden || isMaxFixedColumn
|
|
13951
|
+
disabled: isDisabled || isHidden || isMaxFixedColumn
|
|
13936
13952
|
}]
|
|
13937
13953
|
},
|
|
13938
13954
|
on: {
|
|
@@ -14386,30 +14402,43 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
14386
14402
|
customOpts
|
|
14387
14403
|
} = $xetable;
|
|
14388
14404
|
const {
|
|
14389
|
-
checkMethod
|
|
14405
|
+
checkMethod,
|
|
14406
|
+
visibleMethod
|
|
14390
14407
|
} = customOpts;
|
|
14391
14408
|
const isAll = !customStore.isAll;
|
|
14392
14409
|
if (customOpts.immediate) {
|
|
14393
14410
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
14394
|
-
if (
|
|
14411
|
+
if (visibleMethod && !visibleMethod({
|
|
14395
14412
|
column
|
|
14396
14413
|
})) {
|
|
14397
|
-
|
|
14398
|
-
column.renderVisible = isAll;
|
|
14399
|
-
column.halfVisible = false;
|
|
14414
|
+
return;
|
|
14400
14415
|
}
|
|
14416
|
+
if (checkMethod && !checkMethod({
|
|
14417
|
+
column
|
|
14418
|
+
})) {
|
|
14419
|
+
return;
|
|
14420
|
+
}
|
|
14421
|
+
column.visible = isAll;
|
|
14422
|
+
column.renderVisible = isAll;
|
|
14423
|
+
column.halfVisible = false;
|
|
14401
14424
|
});
|
|
14402
14425
|
customStore.isAll = isAll;
|
|
14403
14426
|
$xetable.handleCustom();
|
|
14404
14427
|
$xetable.saveCustomStore('update:visible');
|
|
14405
14428
|
} else {
|
|
14406
14429
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
14407
|
-
if (
|
|
14430
|
+
if (visibleMethod && !visibleMethod({
|
|
14431
|
+
column
|
|
14432
|
+
})) {
|
|
14433
|
+
return;
|
|
14434
|
+
}
|
|
14435
|
+
if (checkMethod && !checkMethod({
|
|
14408
14436
|
column
|
|
14409
14437
|
})) {
|
|
14410
|
-
|
|
14411
|
-
column.halfVisible = false;
|
|
14438
|
+
return;
|
|
14412
14439
|
}
|
|
14440
|
+
column.renderVisible = isAll;
|
|
14441
|
+
column.halfVisible = false;
|
|
14413
14442
|
});
|
|
14414
14443
|
customStore.isAll = isAll;
|
|
14415
14444
|
}
|