vxe-table 3.13.21 → 3.13.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/grid/src/grid.js +51 -40
- package/es/style.css +1 -1
- package/es/table/module/filter/panel.js +12 -2
- package/es/table/module/keyboard/mixin.js +50 -6
- package/es/table/src/methods.js +2 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +58 -57
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +124 -74
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/filter/panel.js +8 -2
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +52 -9
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/methods.js +3 -2
- 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/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +61 -48
- package/packages/table/module/filter/panel.ts +12 -2
- package/packages/table/module/keyboard/mixin.ts +52 -8
- package/packages/table/src/methods.ts +3 -2
- /package/es/{iconfont.1741336846919.ttf → iconfont.1741744075377.ttf} +0 -0
- /package/es/{iconfont.1741336846919.woff → iconfont.1741744075377.woff} +0 -0
- /package/es/{iconfont.1741336846919.woff2 → iconfont.1741744075377.woff2} +0 -0
- /package/lib/{iconfont.1741336846919.ttf → iconfont.1741744075377.ttf} +0 -0
- /package/lib/{iconfont.1741336846919.woff → iconfont.1741744075377.woff} +0 -0
- /package/lib/{iconfont.1741336846919.woff2 → iconfont.1741744075377.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3201,7 +3201,7 @@ function getClass(property, params) {
|
|
|
3201
3201
|
;// ./packages/ui/index.ts
|
|
3202
3202
|
|
|
3203
3203
|
|
|
3204
|
-
const version = "3.13.
|
|
3204
|
+
const version = "3.13.23";
|
|
3205
3205
|
core_.VxeUI.version = version;
|
|
3206
3206
|
core_.VxeUI.tableVersion = version;
|
|
3207
3207
|
core_.VxeUI.setConfig({
|
|
@@ -3828,7 +3828,7 @@ var es_iterator_map = __webpack_require__(1701);
|
|
|
3828
3828
|
const {
|
|
3829
3829
|
log: log_log
|
|
3830
3830
|
} = core_.VxeUI;
|
|
3831
|
-
const log_version = `table v${"3.13.
|
|
3831
|
+
const log_version = `table v${"3.13.23"}`;
|
|
3832
3832
|
const warnLog = log_log.create('warn', log_version);
|
|
3833
3833
|
const errLog = log_log.create('error', log_version);
|
|
3834
3834
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -11933,8 +11933,9 @@ const Methods = {
|
|
|
11933
11933
|
// 如果按下了方向键
|
|
11934
11934
|
if (selected.row && selected.column) {
|
|
11935
11935
|
this.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
|
|
11936
|
-
}
|
|
11937
|
-
|
|
11936
|
+
}
|
|
11937
|
+
// 当前行按键上下移动
|
|
11938
|
+
if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
11938
11939
|
this.moveCurrentRow(isUpArrow, isDwArrow, evnt);
|
|
11939
11940
|
}
|
|
11940
11941
|
}
|
|
@@ -20098,11 +20099,17 @@ const {
|
|
|
20098
20099
|
const rtFilter = compConf ? compConf.renderTableFilter || compConf.renderFilter : null;
|
|
20099
20100
|
if (filterSlot) {
|
|
20100
20101
|
return [h('div', {
|
|
20101
|
-
class: 'vxe-table--filter-template'
|
|
20102
|
+
class: 'vxe-table--filter-template',
|
|
20103
|
+
style: maxHeight ? {
|
|
20104
|
+
maxHeight: `${maxHeight}px`
|
|
20105
|
+
} : {}
|
|
20102
20106
|
}, $xeTable.callSlot(filterSlot, params, h))];
|
|
20103
20107
|
} else if (rtFilter) {
|
|
20104
20108
|
return [h('div', {
|
|
20105
|
-
class: 'vxe-table--filter-template'
|
|
20109
|
+
class: 'vxe-table--filter-template',
|
|
20110
|
+
style: maxHeight ? {
|
|
20111
|
+
maxHeight: `${maxHeight}px`
|
|
20112
|
+
} : {}
|
|
20106
20113
|
}, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))];
|
|
20107
20114
|
}
|
|
20108
20115
|
const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some(item => item._checked);
|
|
@@ -25212,15 +25219,22 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
|
|
|
25212
25219
|
},
|
|
25213
25220
|
// 处理当前行方向键移动
|
|
25214
25221
|
moveCurrentRow(isUpArrow, isDwArrow, evnt) {
|
|
25222
|
+
const $xeTable = this;
|
|
25223
|
+
const props = $xeTable;
|
|
25224
|
+
const reactData = $xeTable;
|
|
25225
|
+
const internalData = $xeTable;
|
|
25226
|
+
const {
|
|
25227
|
+
treeConfig
|
|
25228
|
+
} = props;
|
|
25229
|
+
const {
|
|
25230
|
+
currentRow
|
|
25231
|
+
} = reactData;
|
|
25215
25232
|
const {
|
|
25216
|
-
currentRow,
|
|
25217
|
-
treeConfig,
|
|
25218
|
-
treeOpts,
|
|
25219
25233
|
afterFullData
|
|
25220
|
-
} =
|
|
25234
|
+
} = internalData;
|
|
25235
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
25221
25236
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
25222
25237
|
let targetRow;
|
|
25223
|
-
evnt.preventDefault();
|
|
25224
25238
|
if (currentRow) {
|
|
25225
25239
|
if (treeConfig) {
|
|
25226
25240
|
const {
|
|
@@ -25235,7 +25249,7 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
|
|
|
25235
25249
|
targetRow = items[index + 1];
|
|
25236
25250
|
}
|
|
25237
25251
|
} else {
|
|
25238
|
-
const _rowIndex =
|
|
25252
|
+
const _rowIndex = $xeTable.getVTRowIndex(currentRow);
|
|
25239
25253
|
if (isUpArrow && _rowIndex > 0) {
|
|
25240
25254
|
targetRow = afterFullData[_rowIndex - 1];
|
|
25241
25255
|
} else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
|
|
@@ -25246,11 +25260,47 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
|
|
|
25246
25260
|
targetRow = afterFullData[0];
|
|
25247
25261
|
}
|
|
25248
25262
|
if (targetRow) {
|
|
25263
|
+
evnt.preventDefault();
|
|
25249
25264
|
const params = {
|
|
25250
|
-
$table:
|
|
25251
|
-
row: targetRow
|
|
25265
|
+
$table: $xeTable,
|
|
25266
|
+
row: targetRow,
|
|
25267
|
+
rowIndex: $xeTable.getRowIndex(targetRow),
|
|
25268
|
+
$rowIndex: $xeTable.getVMRowIndex(targetRow)
|
|
25252
25269
|
};
|
|
25253
|
-
|
|
25270
|
+
$xeTable.scrollToRow(targetRow).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
25271
|
+
}
|
|
25272
|
+
},
|
|
25273
|
+
// 处理当前列方向键移动
|
|
25274
|
+
moveCurrentColumn(isLeftArrow, isRightArrow, evnt) {
|
|
25275
|
+
const $xeTable = this;
|
|
25276
|
+
const reactData = $xeTable;
|
|
25277
|
+
const internalData = $xeTable;
|
|
25278
|
+
const {
|
|
25279
|
+
currentColumn
|
|
25280
|
+
} = reactData;
|
|
25281
|
+
const {
|
|
25282
|
+
visibleColumn
|
|
25283
|
+
} = internalData;
|
|
25284
|
+
let targetCol = null;
|
|
25285
|
+
if (currentColumn) {
|
|
25286
|
+
const _columnIndex = $xeTable.getVTColumnIndex(currentColumn);
|
|
25287
|
+
if (isLeftArrow && _columnIndex > 0) {
|
|
25288
|
+
targetCol = visibleColumn[_columnIndex - 1];
|
|
25289
|
+
} else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
|
|
25290
|
+
targetCol = visibleColumn[_columnIndex + 1];
|
|
25291
|
+
}
|
|
25292
|
+
} else {
|
|
25293
|
+
targetCol = visibleColumn[0];
|
|
25294
|
+
}
|
|
25295
|
+
if (targetCol) {
|
|
25296
|
+
evnt.preventDefault();
|
|
25297
|
+
const params = {
|
|
25298
|
+
$table: $xeTable,
|
|
25299
|
+
column: targetCol,
|
|
25300
|
+
columnIndex: $xeTable.getColumnIndex(targetCol),
|
|
25301
|
+
$columnIndex: $xeTable.getVMColumnIndex(targetCol)
|
|
25302
|
+
};
|
|
25303
|
+
$xeTable.scrollToColumn(targetCol).then(() => $xeTable.triggerCurrentColumnEvent(evnt, params));
|
|
25254
25304
|
}
|
|
25255
25305
|
},
|
|
25256
25306
|
// 处理可编辑方向键移动
|
|
@@ -29269,6 +29319,24 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
|
|
|
29269
29319
|
}
|
|
29270
29320
|
return null;
|
|
29271
29321
|
}
|
|
29322
|
+
const getConfigSlot = ($xeGrid, slotConfigs) => {
|
|
29323
|
+
const slots = $xeGrid.$scopedSlots;
|
|
29324
|
+
const slotConf = {};
|
|
29325
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectMap(slotConfigs, (slotFunc, slotKey) => {
|
|
29326
|
+
if (slotFunc) {
|
|
29327
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
|
|
29328
|
+
if (slots[slotFunc]) {
|
|
29329
|
+
slotConf[slotKey] = slots[slotFunc];
|
|
29330
|
+
} else {
|
|
29331
|
+
errLog('vxe.error.notSlot', [slotFunc]);
|
|
29332
|
+
}
|
|
29333
|
+
} else {
|
|
29334
|
+
slotConf[slotKey] = slotFunc;
|
|
29335
|
+
}
|
|
29336
|
+
}
|
|
29337
|
+
});
|
|
29338
|
+
return slotConf;
|
|
29339
|
+
};
|
|
29272
29340
|
function getToolbarSlots(_vm) {
|
|
29273
29341
|
const {
|
|
29274
29342
|
$scopedSlots,
|
|
@@ -29298,26 +29366,6 @@ function getToolbarSlots(_vm) {
|
|
|
29298
29366
|
}
|
|
29299
29367
|
return slots;
|
|
29300
29368
|
}
|
|
29301
|
-
function getPagerSlots(_vm) {
|
|
29302
|
-
const {
|
|
29303
|
-
pagerOpts
|
|
29304
|
-
} = _vm;
|
|
29305
|
-
const pagerOptSlots = pagerOpts.slots;
|
|
29306
|
-
const slots = {};
|
|
29307
|
-
let leftSlot;
|
|
29308
|
-
let rightSlot;
|
|
29309
|
-
if (pagerOptSlots) {
|
|
29310
|
-
leftSlot = getFuncSlot(_vm, pagerOptSlots, 'left');
|
|
29311
|
-
rightSlot = getFuncSlot(_vm, pagerOptSlots, 'right');
|
|
29312
|
-
if (leftSlot) {
|
|
29313
|
-
slots.left = leftSlot;
|
|
29314
|
-
}
|
|
29315
|
-
if (rightSlot) {
|
|
29316
|
-
slots.right = rightSlot;
|
|
29317
|
-
}
|
|
29318
|
-
}
|
|
29319
|
-
return slots;
|
|
29320
|
-
}
|
|
29321
29369
|
function getTableOns(_vm) {
|
|
29322
29370
|
const {
|
|
29323
29371
|
$listeners,
|
|
@@ -29340,6 +29388,30 @@ function getTableOns(_vm) {
|
|
|
29340
29388
|
}
|
|
29341
29389
|
return ons;
|
|
29342
29390
|
}
|
|
29391
|
+
function pageChangeEvent($xeGrid, params) {
|
|
29392
|
+
const props = $xeGrid;
|
|
29393
|
+
const reactData = $xeGrid;
|
|
29394
|
+
const {
|
|
29395
|
+
proxyConfig
|
|
29396
|
+
} = props;
|
|
29397
|
+
const {
|
|
29398
|
+
tablePage
|
|
29399
|
+
} = reactData;
|
|
29400
|
+
const {
|
|
29401
|
+
$event,
|
|
29402
|
+
currentPage,
|
|
29403
|
+
pageSize
|
|
29404
|
+
} = params;
|
|
29405
|
+
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
29406
|
+
tablePage.currentPage = currentPage;
|
|
29407
|
+
tablePage.pageSize = pageSize;
|
|
29408
|
+
$xeGrid.dispatchEvent('page-change', params, $event);
|
|
29409
|
+
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
29410
|
+
$xeGrid.commitProxy('query').then(rest => {
|
|
29411
|
+
$xeGrid.dispatchEvent('proxy-query', rest, $event);
|
|
29412
|
+
});
|
|
29413
|
+
}
|
|
29414
|
+
}
|
|
29343
29415
|
/**
|
|
29344
29416
|
* 渲染表单
|
|
29345
29417
|
*/
|
|
@@ -29477,32 +29549,34 @@ function renderBottom(h, _vm) {
|
|
|
29477
29549
|
function renderPager(h, $xeGrid) {
|
|
29478
29550
|
const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
|
|
29479
29551
|
const props = $xeGrid;
|
|
29552
|
+
const slots = $xeGrid.$scopedSlots;
|
|
29553
|
+
const reactData = $xeGrid;
|
|
29480
29554
|
const {
|
|
29481
|
-
|
|
29482
|
-
|
|
29555
|
+
proxyConfig,
|
|
29556
|
+
pagerConfig
|
|
29483
29557
|
} = props;
|
|
29484
|
-
const
|
|
29485
|
-
|
|
29486
|
-
|
|
29487
|
-
|
|
29488
|
-
const pagerSlot = $scopedSlots.pager;
|
|
29489
|
-
const hasPager = !!(pagerSlot || isEnableConf(pagerConfig));
|
|
29490
|
-
if (hasPager) {
|
|
29558
|
+
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
29559
|
+
const pagerOpts = $xeGrid.computePagerOpts;
|
|
29560
|
+
const pagerSlot = slots.pager;
|
|
29561
|
+
if (pagerConfig && isEnableConf(pagerOpts) || slots.pager) {
|
|
29491
29562
|
return h('div', {
|
|
29492
|
-
key: 'pager',
|
|
29493
29563
|
ref: 'refPagerWrapper',
|
|
29564
|
+
key: 'pager',
|
|
29494
29565
|
class: 'vxe-grid--pager-wrapper'
|
|
29495
29566
|
}, pagerSlot ? pagerSlot.call($xeGrid, {
|
|
29496
29567
|
$grid: $xeGrid
|
|
29497
|
-
}
|
|
29568
|
+
}) : [VxeUIPagerComponent ? h(VxeUIPagerComponent, {
|
|
29569
|
+
ref: 'refPager',
|
|
29498
29570
|
props: {
|
|
29499
|
-
|
|
29500
|
-
...(proxyConfig ? tablePage : {})
|
|
29571
|
+
...pagerOpts,
|
|
29572
|
+
...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})
|
|
29501
29573
|
},
|
|
29502
29574
|
on: {
|
|
29503
|
-
'page-change'
|
|
29575
|
+
'page-change'(params) {
|
|
29576
|
+
pageChangeEvent($xeGrid, params);
|
|
29577
|
+
}
|
|
29504
29578
|
},
|
|
29505
|
-
scopedSlots:
|
|
29579
|
+
scopedSlots: getConfigSlot($xeGrid, pagerOpts.slots)
|
|
29506
29580
|
}) : grid_renderEmptyElement($xeGrid)]);
|
|
29507
29581
|
}
|
|
29508
29582
|
return grid_renderEmptyElement($xeGrid);
|
|
@@ -30525,30 +30599,6 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30525
30599
|
}
|
|
30526
30600
|
}
|
|
30527
30601
|
},
|
|
30528
|
-
pageChangeEvent(params) {
|
|
30529
|
-
const {
|
|
30530
|
-
proxyConfig,
|
|
30531
|
-
tablePage
|
|
30532
|
-
} = this;
|
|
30533
|
-
const {
|
|
30534
|
-
currentPage,
|
|
30535
|
-
pageSize
|
|
30536
|
-
} = params;
|
|
30537
|
-
tablePage.currentPage = currentPage;
|
|
30538
|
-
tablePage.pageSize = pageSize;
|
|
30539
|
-
this.$emit('page-change', Object.assign({
|
|
30540
|
-
$grid: this
|
|
30541
|
-
}, params));
|
|
30542
|
-
if (proxyConfig) {
|
|
30543
|
-
this.commitProxy('query').then(rest => {
|
|
30544
|
-
this.$emit('proxy-query', {
|
|
30545
|
-
...rest,
|
|
30546
|
-
$grid: this,
|
|
30547
|
-
$event: params.$event
|
|
30548
|
-
});
|
|
30549
|
-
});
|
|
30550
|
-
}
|
|
30551
|
-
},
|
|
30552
30602
|
sortChangeEvent(params) {
|
|
30553
30603
|
const {
|
|
30554
30604
|
$table,
|