vxe-table 3.15.14 → 3.15.16
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/footer.js +1 -1
- package/es/table/src/header.js +1 -1
- package/es/table/src/methods.js +9 -4
- package/es/table/src/table.js +5 -7
- package/es/ui/index.js +5 -5
- package/es/ui/src/dom.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +22 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +9 -4
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +4 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +5 -5
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +1 -1
- 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/package.json +2 -2
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/methods.ts +10 -4
- package/packages/table/src/table.ts +5 -7
- package/packages/ui/index.ts +4 -4
- package/packages/ui/src/dom.ts +1 -1
- /package/es/{iconfont.1745827933282.ttf → iconfont.1745983689751.ttf} +0 -0
- /package/es/{iconfont.1745827933282.woff → iconfont.1745983689751.woff} +0 -0
- /package/es/{iconfont.1745827933282.woff2 → iconfont.1745983689751.woff2} +0 -0
- /package/lib/{iconfont.1745827933282.ttf → iconfont.1745983689751.ttf} +0 -0
- /package/lib/{iconfont.1745827933282.woff → iconfont.1745983689751.woff} +0 -0
- /package/lib/{iconfont.1745827933282.woff2 → iconfont.1745983689751.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -1031,7 +1031,7 @@ function updateStyle($xeTable) {
|
|
|
1031
1031
|
if (tableElem) {
|
|
1032
1032
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
1033
1033
|
// 兼容性处理
|
|
1034
|
-
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj
|
|
1034
|
+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj.firefox || browseObj.safari) ? `${osbWidth}px` : '';
|
|
1035
1035
|
}
|
|
1036
1036
|
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
|
|
1037
1037
|
if (emptyBlockElem) {
|
|
@@ -2682,7 +2682,7 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
2682
2682
|
// }
|
|
2683
2683
|
// }
|
|
2684
2684
|
if (!(props.height || props.maxHeight)) {
|
|
2685
|
-
errLog('vxe.error.reqProp', ['
|
|
2685
|
+
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config={enabled: false}']);
|
|
2686
2686
|
}
|
|
2687
2687
|
// if (!props.showOverflow) {
|
|
2688
2688
|
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
@@ -3164,10 +3164,15 @@ const wheelScrollTopTo = (diffNum, cb) => {
|
|
|
3164
3164
|
requestAnimationFrame(step);
|
|
3165
3165
|
};
|
|
3166
3166
|
function updateHeight($xeTable) {
|
|
3167
|
+
const reactData = $xeTable;
|
|
3167
3168
|
const internalData = $xeTable;
|
|
3168
3169
|
internalData.customHeight = calcTableHeight($xeTable, 'height');
|
|
3169
3170
|
internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
|
|
3170
3171
|
internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
|
|
3172
|
+
// 如果启用虚拟滚动,默认高度
|
|
3173
|
+
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
|
|
3174
|
+
internalData.customHeight = 300;
|
|
3175
|
+
}
|
|
3171
3176
|
}
|
|
3172
3177
|
function calcColumnAutoWidth(column, wrapperEl) {
|
|
3173
3178
|
const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);
|
|
@@ -9265,7 +9270,7 @@ const Methods = {
|
|
|
9265
9270
|
if (isRollX) {
|
|
9266
9271
|
evnt.preventDefault();
|
|
9267
9272
|
internalData.inWheelScroll = true;
|
|
9268
|
-
if (browseObj
|
|
9273
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
9269
9274
|
const currLeftNum = scrollLeft;
|
|
9270
9275
|
setScrollLeft(xHandleEl, currLeftNum);
|
|
9271
9276
|
setScrollLeft(bodyScrollElem, currLeftNum);
|
|
@@ -9298,7 +9303,7 @@ const Methods = {
|
|
|
9298
9303
|
}
|
|
9299
9304
|
if (isRollY) {
|
|
9300
9305
|
evnt.preventDefault();
|
|
9301
|
-
if (browseObj
|
|
9306
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
9302
9307
|
const currTopNum = scrollTop;
|
|
9303
9308
|
setScrollTop(yHandleEl, currTopNum);
|
|
9304
9309
|
setScrollTop(bodyScrollElem, currTopNum);
|
package/es/table/src/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { getFuncText, isEnableConf } from '../../ui/src/utils';
|
|
3
3
|
import { initTpImg } from '../../ui/src/dom';
|
|
4
|
-
import { createHandleGetRowId } from './util';
|
|
4
|
+
import { createHandleGetRowId, getCellHeight } from './util';
|
|
5
5
|
import { VxeUI } from '../../ui';
|
|
6
6
|
import methods from './methods';
|
|
7
7
|
import TableBodyComponent from './body';
|
|
@@ -791,18 +791,16 @@ export default {
|
|
|
791
791
|
const $xeTable = this;
|
|
792
792
|
const props = $xeTable;
|
|
793
793
|
const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig);
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
}
|
|
794
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
795
|
+
headerCellOpts.height = XEUtils.toNumber(getCellHeight(headerCellOpts.height || cellOpts.height));
|
|
797
796
|
return headerCellOpts;
|
|
798
797
|
},
|
|
799
798
|
computeFooterCellOpts() {
|
|
800
799
|
const $xeTable = this;
|
|
801
800
|
const props = $xeTable;
|
|
802
801
|
const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig);
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
}
|
|
802
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
803
|
+
footerCellOpts.height = XEUtils.toNumber(getCellHeight(footerCellOpts.height || cellOpts.height));
|
|
806
804
|
return footerCellOpts;
|
|
807
805
|
},
|
|
808
806
|
rowOpts() {
|
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "3.15.
|
|
3
|
+
export const version = "3.15.16";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -201,16 +201,16 @@ VxeUI.setConfig({
|
|
|
201
201
|
isReplace: true
|
|
202
202
|
},
|
|
203
203
|
virtualXConfig: {
|
|
204
|
-
enabled:
|
|
204
|
+
enabled: false,
|
|
205
205
|
gt: 24,
|
|
206
206
|
preSize: 0,
|
|
207
|
-
oSize:
|
|
207
|
+
oSize: 0
|
|
208
208
|
},
|
|
209
209
|
virtualYConfig: {
|
|
210
|
-
enabled:
|
|
210
|
+
enabled: false,
|
|
211
211
|
gt: 100,
|
|
212
212
|
preSize: 1,
|
|
213
|
-
oSize:
|
|
213
|
+
oSize: 0
|
|
214
214
|
},
|
|
215
215
|
scrollbarConfig: {
|
|
216
216
|
// width: 14,
|
package/es/ui/src/dom.js
CHANGED
|
@@ -45,7 +45,7 @@ export function isScale(val) {
|
|
|
45
45
|
return val && /^\d+%$/.test(val);
|
|
46
46
|
}
|
|
47
47
|
export function hasClass(elem, cls) {
|
|
48
|
-
return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls));
|
|
48
|
+
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
|
49
49
|
}
|
|
50
50
|
export function removeClass(elem, cls) {
|
|
51
51
|
if (elem && hasClass(elem, cls)) {
|
package/es/ui/src/log.js
CHANGED
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.15.
|
|
2223
|
+
const version = "3.15.16";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2421,16 +2421,16 @@ core_.VxeUI.setConfig({
|
|
|
2421
2421
|
isReplace: true
|
|
2422
2422
|
},
|
|
2423
2423
|
virtualXConfig: {
|
|
2424
|
-
enabled:
|
|
2424
|
+
enabled: false,
|
|
2425
2425
|
gt: 24,
|
|
2426
2426
|
preSize: 0,
|
|
2427
|
-
oSize:
|
|
2427
|
+
oSize: 0
|
|
2428
2428
|
},
|
|
2429
2429
|
virtualYConfig: {
|
|
2430
|
-
enabled:
|
|
2430
|
+
enabled: false,
|
|
2431
2431
|
gt: 100,
|
|
2432
2432
|
preSize: 1,
|
|
2433
|
-
oSize:
|
|
2433
|
+
oSize: 0
|
|
2434
2434
|
},
|
|
2435
2435
|
scrollbarConfig: {
|
|
2436
2436
|
// width: 14,
|
|
@@ -2718,7 +2718,7 @@ function isScale(val) {
|
|
|
2718
2718
|
return val && /^\d+%$/.test(val);
|
|
2719
2719
|
}
|
|
2720
2720
|
function hasClass(elem, cls) {
|
|
2721
|
-
return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls));
|
|
2721
|
+
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
|
2722
2722
|
}
|
|
2723
2723
|
function removeClass(elem, cls) {
|
|
2724
2724
|
if (elem && hasClass(elem, cls)) {
|
|
@@ -2858,7 +2858,7 @@ function isNodeElement(elem) {
|
|
|
2858
2858
|
const {
|
|
2859
2859
|
log: log_log
|
|
2860
2860
|
} = core_.VxeUI;
|
|
2861
|
-
const log_version = `table v${"3.15.
|
|
2861
|
+
const log_version = `table v${"3.15.16"}`;
|
|
2862
2862
|
const warnLog = log_log.create('warn', log_version);
|
|
2863
2863
|
const errLog = log_log.create('error', log_version);
|
|
2864
2864
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -6568,7 +6568,7 @@ function updateStyle($xeTable) {
|
|
|
6568
6568
|
if (tableElem) {
|
|
6569
6569
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
6570
6570
|
// 兼容性处理
|
|
6571
|
-
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj
|
|
6571
|
+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj.firefox || browseObj.safari) ? `${osbWidth}px` : '';
|
|
6572
6572
|
}
|
|
6573
6573
|
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
|
|
6574
6574
|
if (emptyBlockElem) {
|
|
@@ -8471,7 +8471,7 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
8471
8471
|
// }
|
|
8472
8472
|
// }
|
|
8473
8473
|
if (!(props.height || props.maxHeight)) {
|
|
8474
|
-
errLog('vxe.error.reqProp', ['
|
|
8474
|
+
errLog('vxe.error.reqProp', ['height | max-height | virtual-y-config={enabled: false}']);
|
|
8475
8475
|
}
|
|
8476
8476
|
// if (!props.showOverflow) {
|
|
8477
8477
|
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
@@ -9015,10 +9015,15 @@ const wheelScrollTopTo = (diffNum, cb) => {
|
|
|
9015
9015
|
requestAnimationFrame(step);
|
|
9016
9016
|
};
|
|
9017
9017
|
function updateHeight($xeTable) {
|
|
9018
|
+
const reactData = $xeTable;
|
|
9018
9019
|
const internalData = $xeTable;
|
|
9019
9020
|
internalData.customHeight = calcTableHeight($xeTable, 'height');
|
|
9020
9021
|
internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
|
|
9021
9022
|
internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
|
|
9023
|
+
// 如果启用虚拟滚动,默认高度
|
|
9024
|
+
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
|
|
9025
|
+
internalData.customHeight = 300;
|
|
9026
|
+
}
|
|
9022
9027
|
}
|
|
9023
9028
|
function calcColumnAutoWidth(column, wrapperEl) {
|
|
9024
9029
|
const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);
|
|
@@ -16126,7 +16131,7 @@ const Methods = {
|
|
|
16126
16131
|
if (isRollX) {
|
|
16127
16132
|
evnt.preventDefault();
|
|
16128
16133
|
internalData.inWheelScroll = true;
|
|
16129
|
-
if (browseObj
|
|
16134
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
16130
16135
|
const currLeftNum = scrollLeft;
|
|
16131
16136
|
setScrollLeft(xHandleEl, currLeftNum);
|
|
16132
16137
|
setScrollLeft(bodyScrollElem, currLeftNum);
|
|
@@ -16158,7 +16163,7 @@ const Methods = {
|
|
|
16158
16163
|
}
|
|
16159
16164
|
if (isRollY) {
|
|
16160
16165
|
evnt.preventDefault();
|
|
16161
|
-
if (browseObj
|
|
16166
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
16162
16167
|
const currTopNum = scrollTop;
|
|
16163
16168
|
setScrollTop(yHandleEl, currTopNum);
|
|
16164
16169
|
setScrollTop(bodyScrollElem, currTopNum);
|
|
@@ -17989,7 +17994,7 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
|
|
|
17989
17994
|
const cellOpts = $xeTable.computeCellOpts;
|
|
17990
17995
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
17991
17996
|
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
17992
|
-
const currCellHeight = getCellHeight(headerCellOpts.height
|
|
17997
|
+
const currCellHeight = getCellHeight(headerCellOpts.height) || defaultRowHeight;
|
|
17993
17998
|
const {
|
|
17994
17999
|
disabledMethod: dragDisabledMethod,
|
|
17995
18000
|
isCrossDrag,
|
|
@@ -18455,7 +18460,7 @@ function footer_renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData,
|
|
|
18455
18460
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
18456
18461
|
const cellOpts = $xeTable.computeCellOpts;
|
|
18457
18462
|
const footerCellOpts = $xeTable.computeFooterCellOpts;
|
|
18458
|
-
const currCellHeight = getCellHeight(footerCellOpts.height
|
|
18463
|
+
const currCellHeight = getCellHeight(footerCellOpts.height) || defaultRowHeight;
|
|
18459
18464
|
return tableColumn.map((column, $columnIndex) => {
|
|
18460
18465
|
const {
|
|
18461
18466
|
type,
|
|
@@ -27737,18 +27742,16 @@ function renderBody(h, $xeTable) {
|
|
|
27737
27742
|
const $xeTable = this;
|
|
27738
27743
|
const props = $xeTable;
|
|
27739
27744
|
const headerCellOpts = Object.assign({}, table_getConfig().table.headerCellConfig, props.headerCellConfig);
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
}
|
|
27745
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
27746
|
+
headerCellOpts.height = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getCellHeight(headerCellOpts.height || cellOpts.height));
|
|
27743
27747
|
return headerCellOpts;
|
|
27744
27748
|
},
|
|
27745
27749
|
computeFooterCellOpts() {
|
|
27746
27750
|
const $xeTable = this;
|
|
27747
27751
|
const props = $xeTable;
|
|
27748
27752
|
const footerCellOpts = Object.assign({}, table_getConfig().table.footerCellConfig, props.footerCellConfig);
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
}
|
|
27753
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
27754
|
+
footerCellOpts.height = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getCellHeight(footerCellOpts.height || cellOpts.height));
|
|
27752
27755
|
return footerCellOpts;
|
|
27753
27756
|
},
|
|
27754
27757
|
rowOpts() {
|