vxe-table 3.12.0 → 3.12.1-beta.1
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 +46 -9
- package/es/grid/style.css +14 -0
- package/es/grid/style.min.css +1 -1
- 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/module/export/mixin.js +1 -1
- package/es/table/src/body.js +9 -6
- package/es/table/src/column.js +2 -2
- package/es/table/src/group.js +2 -2
- package/es/table/src/methods.js +21 -9
- package/es/toolbar/src/toolbar.js +2 -2
- 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-grid/style.css +14 -0
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/src/grid.js +42 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +14 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +79 -31
- 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/export/mixin.js +1 -1
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/body.js +7 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +21 -10
- package/lib/table/src/methods.min.js +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-grid/style/style.css +14 -0
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +49 -10
- package/packages/table/module/export/mixin.ts +1 -1
- package/packages/table/src/body.ts +7 -5
- package/packages/table/src/methods.ts +22 -10
- package/packages/ui/src/dom.ts +7 -0
- package/styles/components/grid.scss +13 -0
- /package/es/{iconfont.1735661059384.ttf → iconfont.1735808839640.ttf} +0 -0
- /package/es/{iconfont.1735661059384.woff → iconfont.1735808839640.woff} +0 -0
- /package/es/{iconfont.1735661059384.woff2 → iconfont.1735808839640.woff2} +0 -0
- /package/lib/{iconfont.1735661059384.ttf → iconfont.1735808839640.ttf} +0 -0
- /package/lib/{iconfont.1735661059384.woff → iconfont.1735808839640.woff} +0 -0
- /package/lib/{iconfont.1735661059384.woff2 → iconfont.1735808839640.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.12.
|
|
2223
|
+
const version = "3.12.1-beta.1";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2690,6 +2690,12 @@ function addClass(elem, cls) {
|
|
|
2690
2690
|
elem.className = `${elem.className} ${cls}`;
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
|
+
function toCssUnit(val, unit = 'px') {
|
|
2694
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val) || /^\d+$/.test(`${val}`)) {
|
|
2695
|
+
return `${val}${unit}`;
|
|
2696
|
+
}
|
|
2697
|
+
return `${val || ''}`;
|
|
2698
|
+
}
|
|
2693
2699
|
function getDomNode() {
|
|
2694
2700
|
const documentElement = document.documentElement;
|
|
2695
2701
|
const bodyElem = document.body;
|
|
@@ -2808,7 +2814,7 @@ function isNodeElement(elem) {
|
|
|
2808
2814
|
const {
|
|
2809
2815
|
log: log_log
|
|
2810
2816
|
} = core_.VxeUI;
|
|
2811
|
-
const log_version = `table v${"3.12.
|
|
2817
|
+
const log_version = `table v${"3.12.1-beta.1"}`;
|
|
2812
2818
|
const warnLog = log_log.create('warn', log_version);
|
|
2813
2819
|
const errLog = log_log.create('error', log_version);
|
|
2814
2820
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5285,14 +5291,13 @@ const calcCellHeight = $xeTable => {
|
|
|
5285
5291
|
} = props;
|
|
5286
5292
|
const {
|
|
5287
5293
|
tableData,
|
|
5288
|
-
scrollXLoad
|
|
5289
|
-
scrollYLoad
|
|
5294
|
+
scrollXLoad
|
|
5290
5295
|
} = reactData;
|
|
5291
5296
|
const {
|
|
5292
5297
|
fullAllDataRowIdData
|
|
5293
5298
|
} = internalData;
|
|
5294
5299
|
const el = $xeTable.$refs.refElem;
|
|
5295
|
-
if (!showOverflow &&
|
|
5300
|
+
if (!showOverflow && el) {
|
|
5296
5301
|
let paddingTop = 0;
|
|
5297
5302
|
let paddingBottom = 0;
|
|
5298
5303
|
let calcPadding = false;
|
|
@@ -5561,7 +5566,7 @@ const handleScrollToRowColumn = ($xeTable, fieldOrColumn, row) => {
|
|
|
5561
5566
|
function handleRecalculateLayout($xeTable, reFull) {
|
|
5562
5567
|
const internalData = $xeTable;
|
|
5563
5568
|
const el = $xeTable.$refs.refElem;
|
|
5564
|
-
internalData.
|
|
5569
|
+
internalData.rceRunTime = Date.now();
|
|
5565
5570
|
if (!el || !el.clientWidth) {
|
|
5566
5571
|
return $xeTable.$nextTick();
|
|
5567
5572
|
}
|
|
@@ -5597,10 +5602,14 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
|
5597
5602
|
internalData.bodyScrollType = '';
|
|
5598
5603
|
internalData.inFooterScroll = false;
|
|
5599
5604
|
if (isRollX && scrollXLoad) {
|
|
5600
|
-
$xeTable.updateScrollXData()
|
|
5605
|
+
$xeTable.updateScrollXData().then(() => {
|
|
5606
|
+
$xeTable.loadScrollXData();
|
|
5607
|
+
});
|
|
5601
5608
|
}
|
|
5602
5609
|
if (isRollY && scrollYLoad) {
|
|
5603
|
-
$xeTable.updateScrollYData()
|
|
5610
|
+
$xeTable.updateScrollYData().then(() => {
|
|
5611
|
+
$xeTable.loadScrollYData();
|
|
5612
|
+
});
|
|
5604
5613
|
}
|
|
5605
5614
|
$xeTable.updateCellAreas();
|
|
5606
5615
|
}, 200);
|
|
@@ -7830,6 +7839,7 @@ const Methods = {
|
|
|
7830
7839
|
saveCustomStore(type) {
|
|
7831
7840
|
const $xeTable = this;
|
|
7832
7841
|
const props = $xeTable;
|
|
7842
|
+
const reactData = $xeTable;
|
|
7833
7843
|
const {
|
|
7834
7844
|
customConfig
|
|
7835
7845
|
} = props;
|
|
@@ -7845,6 +7855,9 @@ const Methods = {
|
|
|
7845
7855
|
const isCustomVisible = isAllCustom || storageOpts.visible;
|
|
7846
7856
|
const isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
7847
7857
|
const isCustomSort = isAllCustom || storageOpts.sort;
|
|
7858
|
+
if (type !== 'reset') {
|
|
7859
|
+
reactData.isCustomStatus = true;
|
|
7860
|
+
}
|
|
7848
7861
|
if ((customConfig ? isEnableConf(customOpts) : customOpts.enabled) && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
7849
7862
|
if (!tableId) {
|
|
7850
7863
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -8135,7 +8148,7 @@ const Methods = {
|
|
|
8135
8148
|
return new Promise(resolve => {
|
|
8136
8149
|
const {
|
|
8137
8150
|
rceTimeout,
|
|
8138
|
-
|
|
8151
|
+
rceRunTime
|
|
8139
8152
|
} = internalData;
|
|
8140
8153
|
const resizeOpts = $xeTable.computeResizeOpts;
|
|
8141
8154
|
const refreshDelay = resizeOpts.refreshDelay || 20;
|
|
@@ -8145,7 +8158,7 @@ const Methods = {
|
|
|
8145
8158
|
}
|
|
8146
8159
|
if (rceTimeout) {
|
|
8147
8160
|
clearTimeout(rceTimeout);
|
|
8148
|
-
if (
|
|
8161
|
+
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
8149
8162
|
resolve(handleRecalculateLayout($xeTable, !!reFull));
|
|
8150
8163
|
} else {
|
|
8151
8164
|
$xeTable.$nextTick(() => {
|
|
@@ -13219,7 +13232,9 @@ const Methods = {
|
|
|
13219
13232
|
scrollXStore.offsetSize = offsetXSize;
|
|
13220
13233
|
scrollXStore.visibleSize = visibleXSize;
|
|
13221
13234
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
13222
|
-
$xeTable.updateScrollXData()
|
|
13235
|
+
$xeTable.updateScrollXData().then(() => {
|
|
13236
|
+
$xeTable.loadScrollXData();
|
|
13237
|
+
});
|
|
13223
13238
|
} else {
|
|
13224
13239
|
$xeTable.updateScrollXSpace();
|
|
13225
13240
|
}
|
|
@@ -13236,7 +13251,9 @@ const Methods = {
|
|
|
13236
13251
|
scrollYStore.offsetSize = offsetYSize;
|
|
13237
13252
|
scrollYStore.visibleSize = visibleYSize;
|
|
13238
13253
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
13239
|
-
$xeTable.updateScrollYData()
|
|
13254
|
+
$xeTable.updateScrollYData().then(() => {
|
|
13255
|
+
$xeTable.loadScrollYData();
|
|
13256
|
+
});
|
|
13240
13257
|
} else {
|
|
13241
13258
|
$xeTable.updateScrollYSpace();
|
|
13242
13259
|
}
|
|
@@ -14168,12 +14185,14 @@ function renderColumn(h, _vm, $xeTable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
14168
14185
|
}
|
|
14169
14186
|
}
|
|
14170
14187
|
let cellHeight = '';
|
|
14171
|
-
if (hasEllipsis
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
if (!
|
|
14175
|
-
cellHeight = `${rest.height ||
|
|
14188
|
+
if (hasEllipsis) {
|
|
14189
|
+
if (scrollYRHeight || rowHeight) {
|
|
14190
|
+
cellHeight = `${scrollYRHeight || rowHeight}px`;
|
|
14191
|
+
} else if (!isAllOverflow) {
|
|
14192
|
+
cellHeight = `${rest.height || 18}px`;
|
|
14176
14193
|
}
|
|
14194
|
+
} else {
|
|
14195
|
+
cellHeight = `${rest.height || 18}px`;
|
|
14177
14196
|
}
|
|
14178
14197
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
14179
14198
|
if (!$columnIndex && selectCellToRow === true || selectCellToRow === column.field) {
|
|
@@ -21842,7 +21861,7 @@ const convertToRows = originColumns => {
|
|
|
21842
21861
|
handleOptions.data = afterFullData;
|
|
21843
21862
|
}
|
|
21844
21863
|
}
|
|
21845
|
-
return handleExport($xeTable,
|
|
21864
|
+
return handleExport($xeTable, handleOptions);
|
|
21846
21865
|
},
|
|
21847
21866
|
_importByFile(file, options) {
|
|
21848
21867
|
const opts = Object.assign({}, options);
|
|
@@ -26222,10 +26241,30 @@ Object.keys(table.methods).forEach(name => {
|
|
|
26222
26241
|
computeZoomOpts() {
|
|
26223
26242
|
return Object.assign({}, grid_getConfig().grid.zoomConfig, this.zoomConfig);
|
|
26224
26243
|
},
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26244
|
+
computeStyles() {
|
|
26245
|
+
const $xeGrid = this;
|
|
26246
|
+
const props = $xeGrid;
|
|
26247
|
+
const reactData = $xeGrid;
|
|
26248
|
+
const {
|
|
26249
|
+
height,
|
|
26250
|
+
maxHeight
|
|
26251
|
+
} = props;
|
|
26252
|
+
const {
|
|
26253
|
+
isZMax,
|
|
26254
|
+
tZindex
|
|
26255
|
+
} = reactData;
|
|
26256
|
+
const stys = {};
|
|
26257
|
+
if (isZMax) {
|
|
26258
|
+
stys.zIndex = tZindex;
|
|
26259
|
+
} else {
|
|
26260
|
+
if (height) {
|
|
26261
|
+
stys.height = height === 'auto' || height === '100%' ? '100%' : toCssUnit(height);
|
|
26262
|
+
}
|
|
26263
|
+
if (maxHeight) {
|
|
26264
|
+
stys.maxHeight = maxHeight === 'auto' || maxHeight === '100%' ? '100%' : toCssUnit(maxHeight);
|
|
26265
|
+
}
|
|
26266
|
+
}
|
|
26267
|
+
return stys;
|
|
26229
26268
|
},
|
|
26230
26269
|
tableExtendProps() {
|
|
26231
26270
|
const rest = {};
|
|
@@ -26346,21 +26385,30 @@ Object.keys(table.methods).forEach(name => {
|
|
|
26346
26385
|
grid_globalEvents.off(this, 'keydown');
|
|
26347
26386
|
},
|
|
26348
26387
|
render(h) {
|
|
26349
|
-
const
|
|
26350
|
-
|
|
26351
|
-
|
|
26352
|
-
|
|
26353
|
-
const vSize = computeSize;
|
|
26388
|
+
const $xeGrid = this;
|
|
26389
|
+
const props = $xeGrid;
|
|
26390
|
+
const reactData = $xeGrid;
|
|
26391
|
+
const slots = $xeGrid.$scopedSlots;
|
|
26392
|
+
const vSize = $xeGrid.computeSize;
|
|
26393
|
+
const styles = $xeGrid.computeStyles;
|
|
26394
|
+
const asideLeftSlot = slots.asideLeft || slots['aside-left'];
|
|
26395
|
+
const asideRightSlot = slots.asideRight || slots['aside-right'];
|
|
26354
26396
|
return h('div', {
|
|
26355
26397
|
class: ['vxe-grid', {
|
|
26356
26398
|
[`size--${vSize}`]: vSize,
|
|
26357
26399
|
'is--animat': !!this.animat,
|
|
26358
26400
|
'is--round': this.round,
|
|
26359
|
-
'is--maximize': isZMax,
|
|
26360
|
-
'is--loading':
|
|
26401
|
+
'is--maximize': reactData.isZMax,
|
|
26402
|
+
'is--loading': props.loading || reactData.tableLoading
|
|
26361
26403
|
}],
|
|
26362
|
-
style:
|
|
26363
|
-
},
|
|
26404
|
+
style: styles
|
|
26405
|
+
}, [asideLeftSlot ? h('div', {
|
|
26406
|
+
class: 'vxe-grid--aside-left-wrapper'
|
|
26407
|
+
}, asideLeftSlot.call($xeGrid, {})) : grid_renderEmptyElement($xeGrid), h('div', {
|
|
26408
|
+
class: 'vxe-grid--body-content-wrapper'
|
|
26409
|
+
}, renderLayout(h, $xeGrid)), asideRightSlot ? h('div', {
|
|
26410
|
+
class: 'vxe-grid--aside-right-wrapper'
|
|
26411
|
+
}, asideRightSlot.call($xeGrid, {})) : grid_renderEmptyElement($xeGrid)]);
|
|
26364
26412
|
},
|
|
26365
26413
|
methods: {
|
|
26366
26414
|
...grid_methods,
|