vxe-table 4.12.0-beta.0 → 4.12.0-beta.10
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 +70 -76
- package/es/locale/lang/ar-EG.js +3 -0
- package/es/locale/lang/de-DE.js +3 -0
- package/es/locale/lang/en-US.js +3 -0
- package/es/locale/lang/es-ES.js +3 -0
- package/es/locale/lang/fr-FR.js +3 -0
- package/es/locale/lang/hu-HU.js +3 -0
- package/es/locale/lang/hy-AM.js +3 -0
- package/es/locale/lang/id-ID.js +3 -0
- package/es/locale/lang/it-IT.js +3 -0
- package/es/locale/lang/ja-JP.js +3 -0
- package/es/locale/lang/ko-KR.js +3 -0
- package/es/locale/lang/nb-NO.js +3 -0
- package/es/locale/lang/pt-BR.js +3 -0
- package/es/locale/lang/ru-RU.js +3 -0
- package/es/locale/lang/th-TH.js +3 -0
- package/es/locale/lang/ug-CN.js +3 -0
- package/es/locale/lang/uk-UA.js +3 -0
- package/es/locale/lang/vi-VN.js +3 -0
- package/es/locale/lang/zh-CHT.js +3 -0
- package/es/locale/lang/zh-CN.js +3 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +19 -21
- package/es/table/module/edit/hook.js +1 -1
- package/es/table/module/export/export-panel.js +17 -19
- package/es/table/module/export/hook.js +5 -11
- package/es/table/module/export/import-panel.js +11 -13
- package/es/table/module/keyboard/hook.js +49 -6
- package/es/table/module/validator/hook.js +1 -3
- package/es/table/render/index.js +90 -61
- package/es/table/src/body.js +13 -8
- package/es/table/src/columnInfo.js +26 -28
- package/es/table/src/footer.js +7 -2
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +374 -191
- package/es/table/src/util.js +30 -3
- package/es/toolbar/src/toolbar.js +16 -24
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +67 -82
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +1276 -12214
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +3 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -0
- package/lib/locale/lang/es-ES.js +3 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -0
- package/lib/locale/lang/fr-FR.js +3 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +3 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -0
- package/lib/locale/lang/hy-AM.js +3 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +3 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +3 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +3 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -0
- package/lib/locale/lang/ko-KR.js +3 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -0
- package/lib/locale/lang/nb-NO.js +3 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +3 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -0
- package/lib/locale/lang/ru-RU.js +3 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -0
- package/lib/locale/lang/th-TH.js +3 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +3 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +3 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -0
- package/lib/locale/lang/vi-VN.js +3 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +3 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +3 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -0
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +21 -23
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +1 -1
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +17 -19
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +5 -11
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +11 -13
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +53 -6
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +1 -3
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +98 -66
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +12 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +30 -32
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +7 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +409 -189
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +35 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +16 -24
- package/lib/toolbar/src/toolbar.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 +75 -82
- package/packages/locale/lang/ar-EG.ts +3 -0
- package/packages/locale/lang/de-DE.ts +3 -0
- package/packages/locale/lang/en-US.ts +3 -0
- package/packages/locale/lang/es-ES.ts +3 -0
- package/packages/locale/lang/fr-FR.ts +3 -0
- package/packages/locale/lang/hu-HU.ts +3 -0
- package/packages/locale/lang/hy-AM.ts +3 -0
- package/packages/locale/lang/id-ID.ts +3 -0
- package/packages/locale/lang/it-IT.ts +3 -0
- package/packages/locale/lang/ja-JP.ts +3 -0
- package/packages/locale/lang/ko-KR.ts +3 -0
- package/packages/locale/lang/nb-NO.ts +3 -0
- package/packages/locale/lang/pt-BR.ts +3 -0
- package/packages/locale/lang/ru-RU.ts +3 -0
- package/packages/locale/lang/th-TH.ts +3 -0
- package/packages/locale/lang/ug-CN.ts +3 -0
- package/packages/locale/lang/uk-UA.ts +3 -0
- package/packages/locale/lang/vi-VN.ts +3 -0
- package/packages/locale/lang/zh-CHT.ts +3 -0
- package/packages/locale/lang/zh-CN.ts +3 -0
- package/packages/table/module/custom/panel.ts +19 -21
- package/packages/table/module/edit/hook.ts +1 -1
- package/packages/table/module/export/export-panel.ts +17 -19
- package/packages/table/module/export/hook.ts +5 -11
- package/packages/table/module/export/import-panel.ts +11 -13
- package/packages/table/module/keyboard/hook.ts +49 -8
- package/packages/table/module/validator/hook.ts +1 -3
- package/packages/table/render/index.ts +89 -59
- package/packages/table/src/body.ts +12 -7
- package/packages/table/src/columnInfo.ts +26 -28
- package/packages/table/src/footer.ts +7 -2
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +380 -189
- package/packages/table/src/util.ts +34 -3
- package/packages/toolbar/src/toolbar.ts +16 -24
- /package/es/{iconfont.1740732137800.ttf → iconfont.1741664494856.ttf} +0 -0
- /package/es/{iconfont.1740732137800.woff → iconfont.1741664494856.woff} +0 -0
- /package/es/{iconfont.1740732137800.woff2 → iconfont.1741664494856.woff2} +0 -0
- /package/lib/{iconfont.1740732137800.ttf → iconfont.1741664494856.ttf} +0 -0
- /package/lib/{iconfont.1740732137800.woff → iconfont.1741664494856.woff} +0 -0
- /package/lib/{iconfont.1740732137800.woff2 → iconfont.1741664494856.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, h, ref, computed, provide, reactive, onUnmounted, watch, nextTick, onMounted
|
|
1
|
+
import { defineComponent, h, ref, computed, provide, reactive, onUnmounted, watch, nextTick, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils';
|
|
4
4
|
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit } from '../../ui/src/dom';
|
|
@@ -11,7 +11,7 @@ import { getSlotVNs } from '../../ui/src/vn';
|
|
|
11
11
|
import { errLog } from '../../ui/src/log';
|
|
12
12
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
13
13
|
const tableComponentPropKeys = Object.keys(tableComponentProps);
|
|
14
|
-
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect'];
|
|
14
|
+
const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect'];
|
|
15
15
|
const gridComponentEmits = [
|
|
16
16
|
...tableComponentEmits,
|
|
17
17
|
'page-change',
|
|
@@ -309,10 +309,10 @@ export default defineComponent({
|
|
|
309
309
|
const proxyOpts = computeProxyOpts.value;
|
|
310
310
|
tablePage.currentPage = currentPage;
|
|
311
311
|
tablePage.pageSize = pageSize;
|
|
312
|
-
|
|
312
|
+
$xeGrid.dispatchEvent('page-change', params, $event);
|
|
313
313
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
$xeGrid.commitProxy('query').then((rest) => {
|
|
315
|
+
$xeGrid.dispatchEvent('proxy-query', rest, $event);
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
};
|
|
@@ -407,9 +407,7 @@ export default defineComponent({
|
|
|
407
407
|
return slots[funcSlot];
|
|
408
408
|
}
|
|
409
409
|
else {
|
|
410
|
-
|
|
411
|
-
errLog('vxe.error.notSlot', [funcSlot]);
|
|
412
|
-
}
|
|
410
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
413
411
|
}
|
|
414
412
|
}
|
|
415
413
|
else {
|
|
@@ -418,6 +416,25 @@ export default defineComponent({
|
|
|
418
416
|
}
|
|
419
417
|
return null;
|
|
420
418
|
};
|
|
419
|
+
const getConfigSlot = (slotConfigs) => {
|
|
420
|
+
const slotConf = {};
|
|
421
|
+
XEUtils.objectMap(slotConfigs, (slotFunc, slotKey) => {
|
|
422
|
+
if (slotFunc) {
|
|
423
|
+
if (XEUtils.isString(slotFunc)) {
|
|
424
|
+
if (slots[slotFunc]) {
|
|
425
|
+
slotConf[slotKey] = slots[slotFunc];
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
errLog('vxe.error.notSlot', [slotFunc]);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
slotConf[slotKey] = slotFunc;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
return slotConf;
|
|
437
|
+
};
|
|
421
438
|
/**
|
|
422
439
|
* 渲染表单
|
|
423
440
|
*/
|
|
@@ -466,7 +483,7 @@ export default defineComponent({
|
|
|
466
483
|
class: 'vxe-grid--form-wrapper'
|
|
467
484
|
}, slotVNs);
|
|
468
485
|
}
|
|
469
|
-
return
|
|
486
|
+
return renderEmptyElement($xeGrid);
|
|
470
487
|
};
|
|
471
488
|
/**
|
|
472
489
|
* 渲染工具栏
|
|
@@ -502,7 +519,7 @@ export default defineComponent({
|
|
|
502
519
|
class: 'vxe-grid--toolbar-wrapper'
|
|
503
520
|
}, slotVNs);
|
|
504
521
|
}
|
|
505
|
-
return
|
|
522
|
+
return renderEmptyElement($xeGrid);
|
|
506
523
|
};
|
|
507
524
|
/**
|
|
508
525
|
* 渲染表格顶部区域
|
|
@@ -515,7 +532,7 @@ export default defineComponent({
|
|
|
515
532
|
class: 'vxe-grid--top-wrapper'
|
|
516
533
|
}, slots.top({ $grid: $xeGrid }));
|
|
517
534
|
}
|
|
518
|
-
return
|
|
535
|
+
return renderEmptyElement($xeGrid);
|
|
519
536
|
};
|
|
520
537
|
const renderTableLeft = () => {
|
|
521
538
|
const leftSlot = slots.left;
|
|
@@ -524,7 +541,7 @@ export default defineComponent({
|
|
|
524
541
|
class: 'vxe-grid--left-wrapper'
|
|
525
542
|
}, leftSlot({ $grid: $xeGrid }));
|
|
526
543
|
}
|
|
527
|
-
return
|
|
544
|
+
return renderEmptyElement($xeGrid);
|
|
528
545
|
};
|
|
529
546
|
const renderTableRight = () => {
|
|
530
547
|
const rightSlot = slots.right;
|
|
@@ -533,7 +550,7 @@ export default defineComponent({
|
|
|
533
550
|
class: 'vxe-grid--right-wrapper'
|
|
534
551
|
}, rightSlot({ $grid: $xeGrid }));
|
|
535
552
|
}
|
|
536
|
-
return
|
|
553
|
+
return renderEmptyElement($xeGrid);
|
|
537
554
|
};
|
|
538
555
|
/**
|
|
539
556
|
* 渲染表格
|
|
@@ -585,7 +602,7 @@ export default defineComponent({
|
|
|
585
602
|
class: 'vxe-grid--bottom-wrapper'
|
|
586
603
|
}, slots.bottom({ $grid: $xeGrid }));
|
|
587
604
|
}
|
|
588
|
-
return
|
|
605
|
+
return renderEmptyElement($xeGrid);
|
|
589
606
|
};
|
|
590
607
|
/**
|
|
591
608
|
* 渲染分页
|
|
@@ -594,37 +611,21 @@ export default defineComponent({
|
|
|
594
611
|
const { proxyConfig, pagerConfig } = props;
|
|
595
612
|
const proxyOpts = computeProxyOpts.value;
|
|
596
613
|
const pagerOpts = computePagerOpts.value;
|
|
614
|
+
const pagerSlot = slots.pager;
|
|
597
615
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
598
|
-
let slotVNs = [];
|
|
599
|
-
if (slots.pager) {
|
|
600
|
-
slotVNs = slots.pager({ $grid: $xeGrid });
|
|
601
|
-
}
|
|
602
|
-
else {
|
|
603
|
-
const pagerOptSlots = pagerOpts.slots;
|
|
604
|
-
const pagerSlots = {};
|
|
605
|
-
let leftSlot;
|
|
606
|
-
let rightSlot;
|
|
607
|
-
if (pagerOptSlots) {
|
|
608
|
-
leftSlot = getFuncSlot(pagerOptSlots, 'left');
|
|
609
|
-
rightSlot = getFuncSlot(pagerOptSlots, 'right');
|
|
610
|
-
if (leftSlot) {
|
|
611
|
-
pagerSlots.left = leftSlot;
|
|
612
|
-
}
|
|
613
|
-
if (rightSlot) {
|
|
614
|
-
pagerSlots.right = rightSlot;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
if (VxeUIPagerComponent) {
|
|
618
|
-
slotVNs.push(h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), pagerSlots));
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
616
|
return h('div', {
|
|
622
617
|
ref: refPagerWrapper,
|
|
623
618
|
key: 'pager',
|
|
624
619
|
class: 'vxe-grid--pager-wrapper'
|
|
625
|
-
},
|
|
620
|
+
}, pagerSlot
|
|
621
|
+
? pagerSlot({ $grid: $xeGrid })
|
|
622
|
+
: [
|
|
623
|
+
VxeUIPagerComponent
|
|
624
|
+
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
|
|
625
|
+
: renderEmptyElement($xeGrid)
|
|
626
|
+
]);
|
|
626
627
|
}
|
|
627
|
-
return
|
|
628
|
+
return renderEmptyElement($xeGrid);
|
|
628
629
|
};
|
|
629
630
|
const renderChildLayout = (layoutKeys) => {
|
|
630
631
|
const childVNs = [];
|
|
@@ -746,6 +747,9 @@ export default defineComponent({
|
|
|
746
747
|
};
|
|
747
748
|
const gridMethods = {
|
|
748
749
|
dispatchEvent,
|
|
750
|
+
getEl() {
|
|
751
|
+
return refElem.value;
|
|
752
|
+
},
|
|
749
753
|
/**
|
|
750
754
|
* 提交指令,支持 code 或 button
|
|
751
755
|
* @param {String/Object} code 字符串或对象
|
|
@@ -922,9 +926,7 @@ export default defineComponent({
|
|
|
922
926
|
});
|
|
923
927
|
}
|
|
924
928
|
else {
|
|
925
|
-
|
|
926
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
927
|
-
}
|
|
929
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
928
930
|
}
|
|
929
931
|
break;
|
|
930
932
|
}
|
|
@@ -986,9 +988,7 @@ export default defineComponent({
|
|
|
986
988
|
}
|
|
987
989
|
}
|
|
988
990
|
else {
|
|
989
|
-
|
|
990
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
991
|
-
}
|
|
991
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
992
992
|
}
|
|
993
993
|
break;
|
|
994
994
|
}
|
|
@@ -1063,9 +1063,7 @@ export default defineComponent({
|
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
1065
|
else {
|
|
1066
|
-
|
|
1067
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1068
|
-
}
|
|
1066
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
1069
1067
|
}
|
|
1070
1068
|
break;
|
|
1071
1069
|
}
|
|
@@ -1077,9 +1075,7 @@ export default defineComponent({
|
|
|
1077
1075
|
tCommandMethod({ code, button, $grid: $xeGrid, $table: $xeTable }, ...args);
|
|
1078
1076
|
}
|
|
1079
1077
|
else {
|
|
1080
|
-
|
|
1081
|
-
errLog('vxe.error.notCommands', [code]);
|
|
1082
|
-
}
|
|
1078
|
+
errLog('vxe.error.notCommands', [code]);
|
|
1083
1079
|
}
|
|
1084
1080
|
}
|
|
1085
1081
|
}
|
|
@@ -1189,21 +1185,25 @@ export default defineComponent({
|
|
|
1189
1185
|
* 获取需要排除的高度
|
|
1190
1186
|
*/
|
|
1191
1187
|
getExcludeHeight() {
|
|
1192
|
-
const { height } = props;
|
|
1193
1188
|
const { isZMax } = reactData;
|
|
1194
1189
|
const el = refElem.value;
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1190
|
+
if (el) {
|
|
1191
|
+
const formWrapper = refFormWrapper.value;
|
|
1192
|
+
const toolbarWrapper = refToolbarWrapper.value;
|
|
1193
|
+
const topWrapper = refTopWrapper.value;
|
|
1194
|
+
const bottomWrapper = refBottomWrapper.value;
|
|
1195
|
+
const pagerWrapper = refPagerWrapper.value;
|
|
1196
|
+
const parentEl = el.parentElement;
|
|
1197
|
+
const parentPaddingSize = isZMax ? 0 : (parentEl ? getPaddingTopBottomSize(parentEl) : 0);
|
|
1198
|
+
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
1199
|
+
}
|
|
1200
|
+
return 0;
|
|
1202
1201
|
},
|
|
1203
1202
|
getParentHeight() {
|
|
1204
1203
|
const el = refElem.value;
|
|
1205
1204
|
if (el) {
|
|
1206
|
-
|
|
1205
|
+
const parentEl = el.parentElement;
|
|
1206
|
+
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight();
|
|
1207
1207
|
}
|
|
1208
1208
|
return 0;
|
|
1209
1209
|
},
|
|
@@ -1259,33 +1259,27 @@ export default defineComponent({
|
|
|
1259
1259
|
});
|
|
1260
1260
|
initPages();
|
|
1261
1261
|
onMounted(() => {
|
|
1262
|
-
if (process.env.NODE_ENV === 'development') {
|
|
1263
|
-
nextTick(() => {
|
|
1264
|
-
if (props.formConfig) {
|
|
1265
|
-
if (!VxeUIFormComponent) {
|
|
1266
|
-
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
if (props.pagerConfig) {
|
|
1270
|
-
if (!VxeUIPagerComponent) {
|
|
1271
|
-
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
});
|
|
1275
|
-
}
|
|
1276
1262
|
nextTick(() => {
|
|
1277
1263
|
const { columns } = props;
|
|
1264
|
+
if (props.formConfig) {
|
|
1265
|
+
if (!VxeUIFormComponent) {
|
|
1266
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
if (props.pagerConfig) {
|
|
1270
|
+
if (!VxeUIPagerComponent) {
|
|
1271
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1278
1274
|
// const { data, columns, proxyConfig } = props
|
|
1279
1275
|
// const proxyOpts = computeProxyOpts.value
|
|
1280
1276
|
// const formOpts = computeFormOpts.value
|
|
1281
1277
|
// if (isEnableConf(proxyConfig) && (data || (proxyOpts.form && formOpts.data))) {
|
|
1282
1278
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
1283
1279
|
// }
|
|
1284
|
-
// if (process.env.NODE_ENV === 'development') {
|
|
1285
1280
|
// if (proxyOpts.props) {
|
|
1286
1281
|
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
1287
1282
|
// }
|
|
1288
|
-
// }
|
|
1289
1283
|
if (columns && columns.length) {
|
|
1290
1284
|
$xeGrid.loadColumn(columns);
|
|
1291
1285
|
}
|
package/es/locale/lang/ar-EG.js
CHANGED
package/es/locale/lang/de-DE.js
CHANGED
package/es/locale/lang/en-US.js
CHANGED
package/es/locale/lang/es-ES.js
CHANGED
package/es/locale/lang/fr-FR.js
CHANGED
package/es/locale/lang/hu-HU.js
CHANGED
package/es/locale/lang/hy-AM.js
CHANGED
package/es/locale/lang/id-ID.js
CHANGED
package/es/locale/lang/it-IT.js
CHANGED
package/es/locale/lang/ja-JP.js
CHANGED
package/es/locale/lang/ko-KR.js
CHANGED
package/es/locale/lang/nb-NO.js
CHANGED
package/es/locale/lang/pt-BR.js
CHANGED
package/es/locale/lang/ru-RU.js
CHANGED
package/es/locale/lang/th-TH.js
CHANGED
package/es/locale/lang/ug-CN.js
CHANGED
package/es/locale/lang/uk-UA.js
CHANGED
package/es/locale/lang/vi-VN.js
CHANGED
package/es/locale/lang/zh-CHT.js
CHANGED