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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, h, PropType, ref, Ref, computed, provide, reactive, onUnmounted, watch, nextTick, VNode, ComponentPublicInstance, onMounted
|
|
1
|
+
import { defineComponent, h, PropType, ref, Ref, computed, provide, reactive, onUnmounted, watch, nextTick, VNode, ComponentPublicInstance, 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'
|
|
@@ -17,7 +17,7 @@ const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents,
|
|
|
17
17
|
|
|
18
18
|
const tableComponentPropKeys = Object.keys(tableComponentProps as any)
|
|
19
19
|
|
|
20
|
-
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['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']
|
|
20
|
+
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['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']
|
|
21
21
|
|
|
22
22
|
const gridComponentEmits: VxeGridEmits = [
|
|
23
23
|
...tableComponentEmits,
|
|
@@ -351,10 +351,10 @@ export default defineComponent({
|
|
|
351
351
|
const proxyOpts = computeProxyOpts.value
|
|
352
352
|
tablePage.currentPage = currentPage
|
|
353
353
|
tablePage.pageSize = pageSize
|
|
354
|
-
|
|
354
|
+
$xeGrid.dispatchEvent('page-change', params, $event)
|
|
355
355
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
$xeGrid.commitProxy('query').then((rest) => {
|
|
357
|
+
$xeGrid.dispatchEvent('proxy-query', rest, $event)
|
|
358
358
|
})
|
|
359
359
|
}
|
|
360
360
|
}
|
|
@@ -456,9 +456,7 @@ export default defineComponent({
|
|
|
456
456
|
if (slots[funcSlot]) {
|
|
457
457
|
return slots[funcSlot]
|
|
458
458
|
} else {
|
|
459
|
-
|
|
460
|
-
errLog('vxe.error.notSlot', [funcSlot])
|
|
461
|
-
}
|
|
459
|
+
errLog('vxe.error.notSlot', [funcSlot])
|
|
462
460
|
}
|
|
463
461
|
} else {
|
|
464
462
|
return funcSlot
|
|
@@ -467,6 +465,24 @@ export default defineComponent({
|
|
|
467
465
|
return null
|
|
468
466
|
}
|
|
469
467
|
|
|
468
|
+
const getConfigSlot = (slotConfigs?: Record<string, any>) => {
|
|
469
|
+
const slotConf: Record<string, any> = {}
|
|
470
|
+
XEUtils.objectMap(slotConfigs, (slotFunc, slotKey) => {
|
|
471
|
+
if (slotFunc) {
|
|
472
|
+
if (XEUtils.isString(slotFunc)) {
|
|
473
|
+
if (slots[slotFunc]) {
|
|
474
|
+
slotConf[slotKey] = slots[slotFunc]
|
|
475
|
+
} else {
|
|
476
|
+
errLog('vxe.error.notSlot', [slotFunc])
|
|
477
|
+
}
|
|
478
|
+
} else {
|
|
479
|
+
slotConf[slotKey] = slotFunc
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
})
|
|
483
|
+
return slotConf
|
|
484
|
+
}
|
|
485
|
+
|
|
470
486
|
/**
|
|
471
487
|
* 渲染表单
|
|
472
488
|
*/
|
|
@@ -523,7 +539,7 @@ export default defineComponent({
|
|
|
523
539
|
class: 'vxe-grid--form-wrapper'
|
|
524
540
|
}, slotVNs)
|
|
525
541
|
}
|
|
526
|
-
return
|
|
542
|
+
return renderEmptyElement($xeGrid)
|
|
527
543
|
}
|
|
528
544
|
|
|
529
545
|
/**
|
|
@@ -564,7 +580,7 @@ export default defineComponent({
|
|
|
564
580
|
class: 'vxe-grid--toolbar-wrapper'
|
|
565
581
|
}, slotVNs)
|
|
566
582
|
}
|
|
567
|
-
return
|
|
583
|
+
return renderEmptyElement($xeGrid)
|
|
568
584
|
}
|
|
569
585
|
|
|
570
586
|
/**
|
|
@@ -578,7 +594,7 @@ export default defineComponent({
|
|
|
578
594
|
class: 'vxe-grid--top-wrapper'
|
|
579
595
|
}, slots.top({ $grid: $xeGrid }))
|
|
580
596
|
}
|
|
581
|
-
return
|
|
597
|
+
return renderEmptyElement($xeGrid)
|
|
582
598
|
}
|
|
583
599
|
|
|
584
600
|
const renderTableLeft = () => {
|
|
@@ -588,7 +604,7 @@ export default defineComponent({
|
|
|
588
604
|
class: 'vxe-grid--left-wrapper'
|
|
589
605
|
}, leftSlot({ $grid: $xeGrid }))
|
|
590
606
|
}
|
|
591
|
-
return
|
|
607
|
+
return renderEmptyElement($xeGrid)
|
|
592
608
|
}
|
|
593
609
|
|
|
594
610
|
const renderTableRight = () => {
|
|
@@ -598,7 +614,7 @@ export default defineComponent({
|
|
|
598
614
|
class: 'vxe-grid--right-wrapper'
|
|
599
615
|
}, rightSlot({ $grid: $xeGrid }))
|
|
600
616
|
}
|
|
601
|
-
return
|
|
617
|
+
return renderEmptyElement($xeGrid)
|
|
602
618
|
}
|
|
603
619
|
|
|
604
620
|
/**
|
|
@@ -661,7 +677,7 @@ export default defineComponent({
|
|
|
661
677
|
class: 'vxe-grid--bottom-wrapper'
|
|
662
678
|
}, slots.bottom({ $grid: $xeGrid }))
|
|
663
679
|
}
|
|
664
|
-
return
|
|
680
|
+
return renderEmptyElement($xeGrid)
|
|
665
681
|
}
|
|
666
682
|
|
|
667
683
|
/**
|
|
@@ -671,43 +687,26 @@ export default defineComponent({
|
|
|
671
687
|
const { proxyConfig, pagerConfig } = props
|
|
672
688
|
const proxyOpts = computeProxyOpts.value
|
|
673
689
|
const pagerOpts = computePagerOpts.value
|
|
690
|
+
const pagerSlot = slots.pager
|
|
674
691
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
675
|
-
let slotVNs: VNode[] = []
|
|
676
|
-
if (slots.pager) {
|
|
677
|
-
slotVNs = slots.pager({ $grid: $xeGrid })
|
|
678
|
-
} else {
|
|
679
|
-
const pagerOptSlots = pagerOpts.slots
|
|
680
|
-
const pagerSlots: { [key: string]: () => VNode[] } = {}
|
|
681
|
-
let leftSlot: any
|
|
682
|
-
let rightSlot: any
|
|
683
|
-
if (pagerOptSlots) {
|
|
684
|
-
leftSlot = getFuncSlot(pagerOptSlots, 'left')
|
|
685
|
-
rightSlot = getFuncSlot(pagerOptSlots, 'right')
|
|
686
|
-
if (leftSlot) {
|
|
687
|
-
pagerSlots.left = leftSlot
|
|
688
|
-
}
|
|
689
|
-
if (rightSlot) {
|
|
690
|
-
pagerSlots.right = rightSlot
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
if (VxeUIPagerComponent) {
|
|
694
|
-
slotVNs.push(
|
|
695
|
-
h(VxeUIPagerComponent, {
|
|
696
|
-
ref: refPager,
|
|
697
|
-
...pagerOpts,
|
|
698
|
-
...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {}),
|
|
699
|
-
onPageChange: pageChangeEvent
|
|
700
|
-
}, pagerSlots)
|
|
701
|
-
)
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
692
|
return h('div', {
|
|
705
693
|
ref: refPagerWrapper,
|
|
706
694
|
key: 'pager',
|
|
707
695
|
class: 'vxe-grid--pager-wrapper'
|
|
708
|
-
},
|
|
696
|
+
}, pagerSlot
|
|
697
|
+
? pagerSlot({ $grid: $xeGrid })
|
|
698
|
+
: [
|
|
699
|
+
VxeUIPagerComponent
|
|
700
|
+
? h(VxeUIPagerComponent, {
|
|
701
|
+
ref: refPager,
|
|
702
|
+
...pagerOpts,
|
|
703
|
+
...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {}),
|
|
704
|
+
onPageChange: pageChangeEvent
|
|
705
|
+
}, getConfigSlot(pagerOpts.slots))
|
|
706
|
+
: renderEmptyElement($xeGrid)
|
|
707
|
+
])
|
|
709
708
|
}
|
|
710
|
-
return
|
|
709
|
+
return renderEmptyElement($xeGrid)
|
|
711
710
|
}
|
|
712
711
|
|
|
713
712
|
const renderChildLayout = (layoutKeys: VxeGridPropTypes.LayoutKey[]) => {
|
|
@@ -837,6 +836,9 @@ export default defineComponent({
|
|
|
837
836
|
|
|
838
837
|
const gridMethods: GridMethods = {
|
|
839
838
|
dispatchEvent,
|
|
839
|
+
getEl () {
|
|
840
|
+
return refElem.value
|
|
841
|
+
},
|
|
840
842
|
/**
|
|
841
843
|
* 提交指令,支持 code 或 button
|
|
842
844
|
* @param {String/Object} code 字符串或对象
|
|
@@ -1009,9 +1011,7 @@ export default defineComponent({
|
|
|
1009
1011
|
return { status: false }
|
|
1010
1012
|
})
|
|
1011
1013
|
} else {
|
|
1012
|
-
|
|
1013
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
1014
|
-
}
|
|
1014
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
1015
1015
|
}
|
|
1016
1016
|
break
|
|
1017
1017
|
}
|
|
@@ -1070,9 +1070,7 @@ export default defineComponent({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
} else {
|
|
1073
|
-
|
|
1074
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
1075
|
-
}
|
|
1073
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
1076
1074
|
}
|
|
1077
1075
|
break
|
|
1078
1076
|
}
|
|
@@ -1144,9 +1142,7 @@ export default defineComponent({
|
|
|
1144
1142
|
}
|
|
1145
1143
|
})
|
|
1146
1144
|
} else {
|
|
1147
|
-
|
|
1148
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1149
|
-
}
|
|
1145
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1150
1146
|
}
|
|
1151
1147
|
break
|
|
1152
1148
|
}
|
|
@@ -1157,9 +1153,7 @@ export default defineComponent({
|
|
|
1157
1153
|
if (tCommandMethod) {
|
|
1158
1154
|
tCommandMethod({ code, button, $grid: $xeGrid, $table: $xeTable }, ...args)
|
|
1159
1155
|
} else {
|
|
1160
|
-
|
|
1161
|
-
errLog('vxe.error.notCommands', [code])
|
|
1162
|
-
}
|
|
1156
|
+
errLog('vxe.error.notCommands', [code])
|
|
1163
1157
|
}
|
|
1164
1158
|
}
|
|
1165
1159
|
}
|
|
@@ -1271,21 +1265,25 @@ export default defineComponent({
|
|
|
1271
1265
|
* 获取需要排除的高度
|
|
1272
1266
|
*/
|
|
1273
1267
|
getExcludeHeight () {
|
|
1274
|
-
const { height } = props
|
|
1275
1268
|
const { isZMax } = reactData
|
|
1276
1269
|
const el = refElem.value
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1270
|
+
if (el) {
|
|
1271
|
+
const formWrapper = refFormWrapper.value
|
|
1272
|
+
const toolbarWrapper = refToolbarWrapper.value
|
|
1273
|
+
const topWrapper = refTopWrapper.value
|
|
1274
|
+
const bottomWrapper = refBottomWrapper.value
|
|
1275
|
+
const pagerWrapper = refPagerWrapper.value
|
|
1276
|
+
const parentEl = el.parentElement as HTMLElement
|
|
1277
|
+
const parentPaddingSize = isZMax ? 0 : (parentEl ? getPaddingTopBottomSize(parentEl) : 0)
|
|
1278
|
+
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper)
|
|
1279
|
+
}
|
|
1280
|
+
return 0
|
|
1284
1281
|
},
|
|
1285
1282
|
getParentHeight () {
|
|
1286
1283
|
const el = refElem.value
|
|
1287
1284
|
if (el) {
|
|
1288
|
-
|
|
1285
|
+
const parentEl = el.parentElement as HTMLElement
|
|
1286
|
+
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight()
|
|
1289
1287
|
}
|
|
1290
1288
|
return 0
|
|
1291
1289
|
},
|
|
@@ -1349,23 +1347,20 @@ export default defineComponent({
|
|
|
1349
1347
|
initPages()
|
|
1350
1348
|
|
|
1351
1349
|
onMounted(() => {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1350
|
+
nextTick(() => {
|
|
1351
|
+
const { columns } = props
|
|
1352
|
+
|
|
1353
|
+
if (props.formConfig) {
|
|
1354
|
+
if (!VxeUIFormComponent) {
|
|
1355
|
+
errLog('vxe.error.reqComp', ['vxe-form'])
|
|
1358
1356
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1357
|
+
}
|
|
1358
|
+
if (props.pagerConfig) {
|
|
1359
|
+
if (!VxeUIPagerComponent) {
|
|
1360
|
+
errLog('vxe.error.reqComp', ['vxe-pager'])
|
|
1363
1361
|
}
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1362
|
+
}
|
|
1366
1363
|
|
|
1367
|
-
nextTick(() => {
|
|
1368
|
-
const { columns } = props
|
|
1369
1364
|
// const { data, columns, proxyConfig } = props
|
|
1370
1365
|
// const proxyOpts = computeProxyOpts.value
|
|
1371
1366
|
// const formOpts = computeFormOpts.value
|
|
@@ -1373,11 +1368,9 @@ export default defineComponent({
|
|
|
1373
1368
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
1374
1369
|
// }
|
|
1375
1370
|
|
|
1376
|
-
// if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1377
1371
|
// if (proxyOpts.props) {
|
|
1378
1372
|
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
1379
1373
|
// }
|
|
1380
|
-
// }
|
|
1381
1374
|
|
|
1382
1375
|
if (columns && columns.length) {
|
|
1383
1376
|
$xeGrid.loadColumn(columns)
|
|
@@ -1151,27 +1151,25 @@ export default defineComponent({
|
|
|
1151
1151
|
return renderSimplePanel()
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
})
|
|
1174
|
-
}
|
|
1154
|
+
nextTick(() => {
|
|
1155
|
+
const customOpts = computeCustomOpts.value
|
|
1156
|
+
const { mode } = customOpts
|
|
1157
|
+
if (!VxeUIModalComponent) {
|
|
1158
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
1159
|
+
}
|
|
1160
|
+
if (!VxeUIDrawerComponent && (mode === 'drawer')) {
|
|
1161
|
+
errLog('vxe.error.reqComp', ['vxe-drawer'])
|
|
1162
|
+
}
|
|
1163
|
+
if (!VxeUIButtonComponent) {
|
|
1164
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
1165
|
+
}
|
|
1166
|
+
if (!VxeUINumberInputComponent) {
|
|
1167
|
+
errLog('vxe.error.reqComp', ['vxe-number-input'])
|
|
1168
|
+
}
|
|
1169
|
+
if (!VxeUIRadioGroupComponent) {
|
|
1170
|
+
errLog('vxe.error.reqComp', ['vxe-radio-group'])
|
|
1171
|
+
}
|
|
1172
|
+
})
|
|
1175
1173
|
|
|
1176
1174
|
return renderVN
|
|
1177
1175
|
}
|
|
@@ -283,7 +283,7 @@ hooks.add('tableEditModule', {
|
|
|
283
283
|
}
|
|
284
284
|
return handleInsertRowAt(records.map((item: any) => Object.assign({}, item, { [parentField]: parentRow[rowField] })), targetRow, isInsertNextRow)
|
|
285
285
|
} else {
|
|
286
|
-
errLog('vxe.error.errProp', ['tree-config.
|
|
286
|
+
errLog('vxe.error.errProp', ['tree-config.transform=false', 'tree-config.transform=true'])
|
|
287
287
|
}
|
|
288
288
|
return Promise.resolve({ row: null, rows: [] })
|
|
289
289
|
}
|
|
@@ -521,25 +521,23 @@ export default defineComponent({
|
|
|
521
521
|
: createCommentVNode()
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
})
|
|
542
|
-
}
|
|
524
|
+
nextTick(() => {
|
|
525
|
+
if (!VxeUIModalComponent) {
|
|
526
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
527
|
+
}
|
|
528
|
+
if (!VxeUIButtonComponent) {
|
|
529
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
530
|
+
}
|
|
531
|
+
if (!VxeUISelectComponent) {
|
|
532
|
+
errLog('vxe.error.reqComp', ['vxe-select'])
|
|
533
|
+
}
|
|
534
|
+
if (!VxeUIInputComponent) {
|
|
535
|
+
errLog('vxe.error.reqComp', ['vxe-input'])
|
|
536
|
+
}
|
|
537
|
+
if (!VxeUICheckboxComponent) {
|
|
538
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox'])
|
|
539
|
+
}
|
|
540
|
+
})
|
|
543
541
|
|
|
544
542
|
return renderVN
|
|
545
543
|
}
|