vxe-table 4.13.22 → 4.13.24
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +25 -11
- package/es/table/src/util.js +16 -21
- package/es/table/style.css +15 -6
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +6 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +15 -6
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +41 -32
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +16 -10
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/util.js +17 -20
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +15 -6
- 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/dom.js +7 -0
- package/lib/ui/src/dom.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 +15 -6
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/cell.ts +25 -11
- package/packages/table/src/util.ts +16 -22
- package/packages/ui/src/dom.ts +7 -0
- package/styles/components/table.scss +23 -15
- /package/es/{iconfont.1746836522499.ttf → iconfont.1747008151774.ttf} +0 -0
- /package/es/{iconfont.1746836522499.woff → iconfont.1747008151774.woff} +0 -0
- /package/es/{iconfont.1746836522499.woff2 → iconfont.1747008151774.woff2} +0 -0
- /package/lib/{iconfont.1746836522499.ttf → iconfont.1747008151774.ttf} +0 -0
- /package/lib/{iconfont.1746836522499.woff → iconfont.1747008151774.woff} +0 -0
- /package/lib/{iconfont.1746836522499.woff2 → iconfont.1747008151774.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.13.
|
|
3141
|
+
const version = "4.13.24";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3599
3599
|
const {
|
|
3600
3600
|
log: log_log
|
|
3601
3601
|
} = core_.VxeUI;
|
|
3602
|
-
const log_version = `table v${"4.13.
|
|
3602
|
+
const log_version = `table v${"4.13.24"}`;
|
|
3603
3603
|
const warnLog = log_log.create('warn', log_version);
|
|
3604
3604
|
const errLog = log_log.create('error', log_version);
|
|
3605
3605
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3851,6 +3851,12 @@ function toCssUnit(val, unit = 'px') {
|
|
|
3851
3851
|
}
|
|
3852
3852
|
return `${val || ''}`;
|
|
3853
3853
|
}
|
|
3854
|
+
function queryElement(elem, selector) {
|
|
3855
|
+
if (elem) {
|
|
3856
|
+
return elem.querySelector(selector);
|
|
3857
|
+
}
|
|
3858
|
+
return null;
|
|
3859
|
+
}
|
|
3854
3860
|
function getDomNode() {
|
|
3855
3861
|
const documentElement = document.documentElement;
|
|
3856
3862
|
const bodyElem = document.body;
|
|
@@ -4138,7 +4144,7 @@ function getPaddingLeftRightSize(elem) {
|
|
|
4138
4144
|
}
|
|
4139
4145
|
return 0;
|
|
4140
4146
|
}
|
|
4141
|
-
function
|
|
4147
|
+
function getElementMarginAndWidth(elem) {
|
|
4142
4148
|
if (elem) {
|
|
4143
4149
|
const computedStyle = getComputedStyle(elem);
|
|
4144
4150
|
const marginLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.marginLeft);
|
|
@@ -4147,9 +4153,6 @@ function getElementMarginWidth(elem) {
|
|
|
4147
4153
|
}
|
|
4148
4154
|
return 0;
|
|
4149
4155
|
}
|
|
4150
|
-
function queryCellElement(cell, selector) {
|
|
4151
|
-
return cell.querySelector('.vxe-cell' + selector);
|
|
4152
|
-
}
|
|
4153
4156
|
function toFilters(filters) {
|
|
4154
4157
|
if (filters && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(filters)) {
|
|
4155
4158
|
return filters.map(({
|
|
@@ -4262,19 +4265,19 @@ function getColReMinWidth(params) {
|
|
|
4262
4265
|
const showTitle = headOverflow === 'title';
|
|
4263
4266
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
4264
4267
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
4265
|
-
const minTitleWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(cell).fontSize) || 14) * 1.
|
|
4266
|
-
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(
|
|
4268
|
+
const minTitleWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8);
|
|
4269
|
+
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryElement(cell, '.vxe-cell'));
|
|
4267
4270
|
let mWidth = minTitleWidth + paddingLeftRight;
|
|
4268
4271
|
// 默认最小宽处理
|
|
4269
4272
|
if (hasEllipsis) {
|
|
4270
|
-
const dragIconWidth =
|
|
4271
|
-
const checkboxIconWidth =
|
|
4272
|
-
const requiredIconWidth =
|
|
4273
|
-
const editIconWidth =
|
|
4274
|
-
const prefixIconWidth =
|
|
4275
|
-
const suffixIconWidth =
|
|
4276
|
-
const sortIconWidth =
|
|
4277
|
-
const filterIconWidth =
|
|
4273
|
+
const dragIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--drag-handle'));
|
|
4274
|
+
const checkboxIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--checkbox'));
|
|
4275
|
+
const requiredIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--required-icon'));
|
|
4276
|
+
const editIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--edit-icon'));
|
|
4277
|
+
const prefixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-prefix-icon'));
|
|
4278
|
+
const suffixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-suffix-icon'));
|
|
4279
|
+
const sortIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--sort'));
|
|
4280
|
+
const filterIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--filter'));
|
|
4278
4281
|
mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
|
|
4279
4282
|
}
|
|
4280
4283
|
// 如果设置最小宽
|
|
@@ -4495,7 +4498,8 @@ function rowToVisible($xeTable, row) {
|
|
|
4495
4498
|
showOverflow
|
|
4496
4499
|
} = tableProps;
|
|
4497
4500
|
const {
|
|
4498
|
-
scrollYLoad
|
|
4501
|
+
scrollYLoad,
|
|
4502
|
+
scrollYTop
|
|
4499
4503
|
} = reactData;
|
|
4500
4504
|
const {
|
|
4501
4505
|
elemStore,
|
|
@@ -4515,8 +4519,7 @@ function rowToVisible($xeTable, row) {
|
|
|
4515
4519
|
const bodyScrollTop = bodyScrollElem.scrollTop;
|
|
4516
4520
|
const trElem = bodyScrollElem.querySelector(`[rowid="${rowid}"]`);
|
|
4517
4521
|
if (trElem) {
|
|
4518
|
-
const
|
|
4519
|
-
const trOffsetTop = trElem.offsetTop + (trOffsetParent ? trOffsetParent.offsetTop : 0);
|
|
4522
|
+
const trOffsetTop = trElem.offsetTop + (scrollYLoad ? scrollYTop : 0);
|
|
4520
4523
|
const trHeight = trElem.clientHeight;
|
|
4521
4524
|
// 检测行是否在可视区中
|
|
4522
4525
|
if (trOffsetTop < bodyScrollTop || trOffsetTop > bodyScrollTop + bodyHeight) {
|
|
@@ -4560,7 +4563,8 @@ function colToVisible($xeTable, column, row) {
|
|
|
4560
4563
|
computeRightFixedWidth
|
|
4561
4564
|
} = $xeTable.getComputeMaps();
|
|
4562
4565
|
const {
|
|
4563
|
-
scrollXLoad
|
|
4566
|
+
scrollXLoad,
|
|
4567
|
+
scrollXLeft
|
|
4564
4568
|
} = reactData;
|
|
4565
4569
|
const {
|
|
4566
4570
|
elemStore,
|
|
@@ -4584,8 +4588,7 @@ function colToVisible($xeTable, column, row) {
|
|
|
4584
4588
|
tdElem = bodyScrollElem.querySelector(`.${column.id}`);
|
|
4585
4589
|
}
|
|
4586
4590
|
if (tdElem) {
|
|
4587
|
-
const
|
|
4588
|
-
const tdOffsetLeft = tdElem.offsetLeft + (tdOffsetParent ? tdOffsetParent.offsetLeft : 0);
|
|
4591
|
+
const tdOffsetLeft = tdElem.offsetLeft + (scrollXLoad ? scrollXLeft : 0);
|
|
4589
4592
|
const cellWidth = tdElem.clientWidth;
|
|
4590
4593
|
// 检测是否在可视区中
|
|
4591
4594
|
if (tdOffsetLeft < bodyScrollLeft + leftFixedWidth) {
|
|
@@ -4676,15 +4679,17 @@ function renderTitlePrefixIcon(params) {
|
|
|
4676
4679
|
} = params;
|
|
4677
4680
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
4678
4681
|
if (titlePrefix) {
|
|
4679
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('
|
|
4680
|
-
class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''
|
|
4682
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4683
|
+
class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''],
|
|
4681
4684
|
onMouseenter(evnt) {
|
|
4682
4685
|
$table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
|
|
4683
4686
|
},
|
|
4684
4687
|
onMouseleave(evnt) {
|
|
4685
4688
|
$table.handleTargetLeaveEvent(evnt);
|
|
4686
4689
|
}
|
|
4687
|
-
})
|
|
4690
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4691
|
+
class: titlePrefix.icon || cell_getIcon().TABLE_TITLE_PREFIX
|
|
4692
|
+
})]);
|
|
4688
4693
|
}
|
|
4689
4694
|
return renderEmptyElement($table);
|
|
4690
4695
|
}
|
|
@@ -4695,15 +4700,17 @@ function renderTitleSuffixIcon(params) {
|
|
|
4695
4700
|
} = params;
|
|
4696
4701
|
const titleSuffix = column.titleSuffix;
|
|
4697
4702
|
if (titleSuffix) {
|
|
4698
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('
|
|
4699
|
-
class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''
|
|
4703
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
4704
|
+
class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''],
|
|
4700
4705
|
onMouseenter(evnt) {
|
|
4701
4706
|
$table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
|
|
4702
4707
|
},
|
|
4703
4708
|
onMouseleave(evnt) {
|
|
4704
4709
|
$table.handleTargetLeaveEvent(evnt);
|
|
4705
4710
|
}
|
|
4706
|
-
})
|
|
4711
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4712
|
+
class: titleSuffix.icon || cell_getIcon().TABLE_TITLE_SUFFIX
|
|
4713
|
+
})]);
|
|
4707
4714
|
}
|
|
4708
4715
|
return renderEmptyElement($table);
|
|
4709
4716
|
}
|
|
@@ -5988,11 +5995,13 @@ const Cell = {
|
|
|
5988
5995
|
}
|
|
5989
5996
|
let editIconVNs = [];
|
|
5990
5997
|
if (isEnableConf(editConfig)) {
|
|
5991
|
-
editIconVNs = [isRequired && editOpts.showAsterisk ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('
|
|
5998
|
+
editIconVNs = [isRequired && editOpts.showAsterisk ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5992
5999
|
class: 'vxe-cell--required-icon'
|
|
5993
|
-
}) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('
|
|
5994
|
-
class:
|
|
5995
|
-
}
|
|
6000
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i')]) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6001
|
+
class: 'vxe-cell--edit-icon'
|
|
6002
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
6003
|
+
class: editOpts.icon || cell_getIcon().TABLE_EDIT
|
|
6004
|
+
})]) : renderEmptyElement($table)];
|
|
5996
6005
|
}
|
|
5997
6006
|
return renderHeaderCellBaseVNs(params, editIconVNs.concat(Cell.renderHeaderTitle(params)).concat(sortable ? Cell.renderSortIcon(params) : []).concat(filters ? Cell.renderFilterIcon(params) : []));
|
|
5998
6007
|
},
|