vxe-table 4.22.4 → 4.23.0-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/dist/all.esm.js +211 -126
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +14 -2
- package/es/locale/lang/fr-FR.js +29 -29
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +4 -3
- package/es/table/module/edit/hook.js +5 -4
- package/es/table/module/export/hook.js +6 -4
- package/es/table/module/filter/hook.js +2 -2
- package/es/table/module/keyboard/hook.js +4 -3
- package/es/table/module/menu/hook.js +3 -3
- package/es/table/render/index.js +7 -4
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +140 -90
- package/es/table/src/util.js +7 -3
- package/es/ui/index.js +9 -11
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +13 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +136 -84
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/fr-FR.js +29 -29
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +29 -29
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +3 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +4 -3
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +9 -3
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -1
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +4 -3
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/render/index.js +11 -5
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +3 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/header.js +3 -2
- package/lib/table/src/header.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 +48 -46
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +12 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +9 -11
- 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/lib/ui/src/utils.js +10 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +14 -2
- package/packages/locale/lang/fr-FR.ts +903 -903
- package/packages/table/module/custom/panel.ts +4 -3
- package/packages/table/module/edit/hook.ts +5 -4
- package/packages/table/module/export/hook.ts +6 -4
- package/packages/table/module/filter/hook.ts +2 -2
- package/packages/table/module/keyboard/hook.ts +4 -3
- package/packages/table/module/menu/hook.ts +3 -3
- package/packages/table/render/index.ts +7 -4
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +141 -88
- package/packages/table/src/util.ts +7 -3
- package/packages/ui/index.ts +8 -10
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/es/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/es/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
- /package/lib/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/lib/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/lib/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import { h, ComponentPublicInstance, reactive, ref, Ref, provide, inject, nextTi
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollTopTo, wheelScrollLeftTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasAxternalInputTarget } from '../../ui/src/dom'
|
|
5
|
-
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
|
|
5
|
+
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue, hasEnableConf, getDefaultConfig } from '../../ui/src/utils'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
7
|
import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -60,6 +60,8 @@ export default defineVxeComponent({
|
|
|
60
60
|
|
|
61
61
|
const browseObj = XEUtils.browse()
|
|
62
62
|
|
|
63
|
+
const scrollDefaultConf = Object.assign({}, getConfig().scrollbar)
|
|
64
|
+
|
|
63
65
|
// 使用已安装的组件,如果未安装则不渲染
|
|
64
66
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading')
|
|
65
67
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
|
|
@@ -227,12 +229,12 @@ export default defineVxeComponent({
|
|
|
227
229
|
|
|
228
230
|
const computeScrollbarXOpts = computed(() => {
|
|
229
231
|
const scrollbarOpts = computeScrollbarOpts.value
|
|
230
|
-
return Object.assign({}, scrollbarOpts.x,
|
|
232
|
+
return scrollbarOpts.x ? Object.assign({}, scrollbarOpts.x, scrollbarOpts.xConfig) : (scrollbarOpts.xConfig || {})
|
|
231
233
|
})
|
|
232
234
|
|
|
233
235
|
const computeScrollbarYOpts = computed(() => {
|
|
234
236
|
const scrollbarOpts = computeScrollbarOpts.value
|
|
235
|
-
return Object.assign({}, scrollbarOpts.y,
|
|
237
|
+
return scrollbarOpts.y ? Object.assign({}, scrollbarOpts.y, scrollbarOpts.yConfig) : (scrollbarOpts.yConfig || {})
|
|
236
238
|
})
|
|
237
239
|
|
|
238
240
|
const computeScrollbarXToTop = computed(() => {
|
|
@@ -638,15 +640,18 @@ export default defineVxeComponent({
|
|
|
638
640
|
|
|
639
641
|
const computeTableStyle = computed(() => {
|
|
640
642
|
const scrollbarOpts = computeScrollbarOpts.value
|
|
641
|
-
const
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
if (
|
|
647
|
-
|
|
643
|
+
const scrollbarXOpts = computeScrollbarXOpts.value
|
|
644
|
+
const scrollbarYOpts = computeScrollbarYOpts.value
|
|
645
|
+
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width)
|
|
646
|
+
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height)
|
|
647
|
+
const stys: VxeComponentStyleType = {}
|
|
648
|
+
if (barWidth || barHeight) {
|
|
649
|
+
stys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(barWidth || barHeight)
|
|
650
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight)
|
|
651
|
+
stys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(barHeight || barWidth)
|
|
652
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth)
|
|
648
653
|
}
|
|
649
|
-
return
|
|
654
|
+
return stys
|
|
650
655
|
})
|
|
651
656
|
|
|
652
657
|
const computeTableRowExpandedList = computed(() => {
|
|
@@ -2600,7 +2605,6 @@ export default defineVxeComponent({
|
|
|
2600
2605
|
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value
|
|
2601
2606
|
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value
|
|
2602
2607
|
const isFooterRenderOptimize = computeIsFooterRenderOptimize.value
|
|
2603
|
-
const scrollbarOpts = computeScrollbarOpts.value
|
|
2604
2608
|
const mouseOpts = computeMouseOpts.value
|
|
2605
2609
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper'])
|
|
2606
2610
|
const bodyTableElem = getRefElem(elemStore['main-body-table'])
|
|
@@ -2609,24 +2613,26 @@ export default defineVxeComponent({
|
|
|
2609
2613
|
emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : ''
|
|
2610
2614
|
}
|
|
2611
2615
|
|
|
2612
|
-
const
|
|
2613
|
-
const
|
|
2616
|
+
const scrollbarXOpts = computeScrollbarXOpts.value
|
|
2617
|
+
const scrollbarYOpts = computeScrollbarYOpts.value
|
|
2614
2618
|
const scrollbarYToLeft = computeScrollbarYToLeft.value
|
|
2615
2619
|
|
|
2616
2620
|
let xScrollbarVisible = overflowX ? 'visible' : 'hidden'
|
|
2617
|
-
|
|
2621
|
+
const hideXScroll = scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden'
|
|
2622
|
+
if (!hideXScroll || $xeGanttView) {
|
|
2618
2623
|
osbHeight = scrollbarHeight
|
|
2619
2624
|
xScrollbarVisible = 'visible'
|
|
2620
|
-
} else if (
|
|
2625
|
+
} else if (hideXScroll) {
|
|
2621
2626
|
osbHeight = 0
|
|
2622
2627
|
xScrollbarVisible = 'hidden'
|
|
2623
2628
|
}
|
|
2624
2629
|
|
|
2625
2630
|
let yScrollbarVisible = overflowY ? 'visible' : 'hidden'
|
|
2626
|
-
|
|
2631
|
+
const showYScroll = !(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden')
|
|
2632
|
+
if (!showYScroll || (($xeGantt && $xeGanttView && $xeGantt.reactData.showRightView) && !scrollbarYToLeft)) {
|
|
2627
2633
|
osbWidth = 0
|
|
2628
2634
|
yScrollbarVisible = 'hidden'
|
|
2629
|
-
} else if (
|
|
2635
|
+
} else if (showYScroll) {
|
|
2630
2636
|
osbWidth = scrollbarWidth
|
|
2631
2637
|
yScrollbarVisible = 'visible'
|
|
2632
2638
|
}
|
|
@@ -2873,7 +2879,7 @@ export default defineVxeComponent({
|
|
|
2873
2879
|
if (currentRow) {
|
|
2874
2880
|
$xeTable.setCurrentRow(currentRow)
|
|
2875
2881
|
}
|
|
2876
|
-
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2882
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2877
2883
|
$xeTable.addCellSelectedClass()
|
|
2878
2884
|
}
|
|
2879
2885
|
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
@@ -3469,15 +3475,19 @@ export default defineVxeComponent({
|
|
|
3469
3475
|
let overflowY = false
|
|
3470
3476
|
let overflowX = false
|
|
3471
3477
|
if (bodyWrapperElem) {
|
|
3478
|
+
const scrollbarXOpts = computeScrollbarXOpts.value
|
|
3479
|
+
const scrollbarYOpts = computeScrollbarYOpts.value
|
|
3480
|
+
const barWidth = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width))
|
|
3481
|
+
const barHeight = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height))
|
|
3472
3482
|
overflowY = scrollYHeight > bodyWrapperElem.clientHeight
|
|
3473
3483
|
if (yHandleEl) {
|
|
3474
|
-
reactData.scrollbarWidth =
|
|
3484
|
+
reactData.scrollbarWidth = (barWidth || barHeight) || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14
|
|
3475
3485
|
}
|
|
3476
3486
|
reactData.overflowY = overflowY
|
|
3477
3487
|
|
|
3478
3488
|
overflowX = scrollXWidth > bodyWrapperElem.clientWidth
|
|
3479
3489
|
if (xHandleEl) {
|
|
3480
|
-
reactData.scrollbarHeight =
|
|
3490
|
+
reactData.scrollbarHeight = (barHeight || barWidth) || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14
|
|
3481
3491
|
}
|
|
3482
3492
|
|
|
3483
3493
|
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0
|
|
@@ -3904,12 +3914,13 @@ export default defineVxeComponent({
|
|
|
3904
3914
|
* @param {Array} datas 数据
|
|
3905
3915
|
*/
|
|
3906
3916
|
const loadTableData = (datas: any[], isReload: boolean, isReset: boolean) => {
|
|
3907
|
-
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig } = props
|
|
3917
|
+
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props
|
|
3908
3918
|
const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData
|
|
3909
3919
|
const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData
|
|
3910
3920
|
const rowOpts = computeRowOpts.value
|
|
3911
3921
|
const treeOpts = computeTreeOpts.value
|
|
3912
3922
|
const expandOpts = computeExpandOpts.value
|
|
3923
|
+
const mouseOpts = computeMouseOpts.value
|
|
3913
3924
|
const { transform } = treeOpts
|
|
3914
3925
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
3915
3926
|
let treeData = []
|
|
@@ -3997,7 +4008,7 @@ export default defineVxeComponent({
|
|
|
3997
4008
|
if (keepSource) {
|
|
3998
4009
|
$xeTable.cacheSourceMap(fullData)
|
|
3999
4010
|
}
|
|
4000
|
-
if ($xeTable.clearCellAreas &&
|
|
4011
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
4001
4012
|
$xeTable.clearCellAreas()
|
|
4002
4013
|
$xeTable.clearCopyCellArea()
|
|
4003
4014
|
}
|
|
@@ -6956,7 +6967,7 @@ export default defineVxeComponent({
|
|
|
6956
6967
|
setCurrentColumn (fieldOrColumn) {
|
|
6957
6968
|
const { mouseConfig } = props
|
|
6958
6969
|
const mouseOpts = computeMouseOpts.value
|
|
6959
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected
|
|
6970
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected
|
|
6960
6971
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
6961
6972
|
if (column) {
|
|
6962
6973
|
$xeTable.clearCurrentColumn()
|
|
@@ -8205,7 +8216,7 @@ export default defineVxeComponent({
|
|
|
8205
8216
|
updateCellAreas () {
|
|
8206
8217
|
const { mouseConfig } = props
|
|
8207
8218
|
const mouseOpts = computeMouseOpts.value
|
|
8208
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8219
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8209
8220
|
return $xeTable.handleRecalculateCellAreaEvent()
|
|
8210
8221
|
}
|
|
8211
8222
|
return nextTick()
|
|
@@ -8465,6 +8476,7 @@ export default defineVxeComponent({
|
|
|
8465
8476
|
const editOpts = computeEditOpts.value
|
|
8466
8477
|
const validOpts = computeValidOpts.value
|
|
8467
8478
|
const areaOpts = computeAreaOpts.value
|
|
8479
|
+
const mouseOpts = computeMouseOpts.value
|
|
8468
8480
|
const { actived } = editStore
|
|
8469
8481
|
const $validTooltip = refValidTooltip.value
|
|
8470
8482
|
const tableFilter = refTableFilter.value
|
|
@@ -8557,7 +8569,7 @@ export default defineVxeComponent({
|
|
|
8557
8569
|
}
|
|
8558
8570
|
}
|
|
8559
8571
|
}
|
|
8560
|
-
} else if (mouseConfig) {
|
|
8572
|
+
} else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
8561
8573
|
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
8562
8574
|
if ($xeTable.clearSelected) {
|
|
8563
8575
|
$xeTable.clearSelected()
|
|
@@ -8649,7 +8661,7 @@ export default defineVxeComponent({
|
|
|
8649
8661
|
if (isEsc) {
|
|
8650
8662
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
8651
8663
|
dispatchEvent('keydown-start', {}, evnt)
|
|
8652
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8664
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8653
8665
|
$xeTable.handleKdClAreaEvent(evnt)
|
|
8654
8666
|
} else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
8655
8667
|
evnt.stopPropagation()
|
|
@@ -8658,7 +8670,7 @@ export default defineVxeComponent({
|
|
|
8658
8670
|
$xeTable.closeMenu()
|
|
8659
8671
|
}
|
|
8660
8672
|
$xeTable.closeFilter()
|
|
8661
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
8673
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
8662
8674
|
// 如果是激活编辑状态,则取消编辑
|
|
8663
8675
|
if (actived.row) {
|
|
8664
8676
|
const params = actived.args
|
|
@@ -8735,7 +8747,7 @@ export default defineVxeComponent({
|
|
|
8735
8747
|
} else {
|
|
8736
8748
|
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList)
|
|
8737
8749
|
}
|
|
8738
|
-
} else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8750
|
+
} else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8739
8751
|
$xeTable.handleKdClAreaEvent(evnt)
|
|
8740
8752
|
} else if (isEsc) {
|
|
8741
8753
|
// 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
@@ -8743,7 +8755,7 @@ export default defineVxeComponent({
|
|
|
8743
8755
|
$xeTable.closeMenu()
|
|
8744
8756
|
}
|
|
8745
8757
|
$xeTable.closeFilter()
|
|
8746
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
8758
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
8747
8759
|
// 如果是激活编辑状态,则取消编辑
|
|
8748
8760
|
if (actived.row) {
|
|
8749
8761
|
const params = actived.args
|
|
@@ -8754,7 +8766,7 @@ export default defineVxeComponent({
|
|
|
8754
8766
|
}
|
|
8755
8767
|
}
|
|
8756
8768
|
}
|
|
8757
|
-
} else if (isSpacebar && keyboardConfig && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
8769
|
+
} else if (isSpacebar && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
8758
8770
|
// 空格键支持选中复选框
|
|
8759
8771
|
evnt.preventDefault()
|
|
8760
8772
|
if (selectColumn.type === 'checkbox') {
|
|
@@ -8777,7 +8789,7 @@ export default defineVxeComponent({
|
|
|
8777
8789
|
internalData.keyCtxTimeout = setTimeout(() => {
|
|
8778
8790
|
internalData._keyCtx = false
|
|
8779
8791
|
}, 1000)
|
|
8780
|
-
} else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
8792
|
+
} else if (isEnter && !isAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
8781
8793
|
// 退出选中
|
|
8782
8794
|
if (isControlKey) {
|
|
8783
8795
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -8897,7 +8909,7 @@ export default defineVxeComponent({
|
|
|
8897
8909
|
}
|
|
8898
8910
|
}
|
|
8899
8911
|
}
|
|
8900
|
-
} else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
8912
|
+
} else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
|
|
8901
8913
|
if (!isEditStatus) {
|
|
8902
8914
|
// 如果按下了方向键
|
|
8903
8915
|
if (mouseOpts.selected && selectRow && selectColumn) {
|
|
@@ -8913,7 +8925,7 @@ export default defineVxeComponent({
|
|
|
8913
8925
|
}
|
|
8914
8926
|
}
|
|
8915
8927
|
}
|
|
8916
|
-
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
8928
|
+
} else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
|
|
8917
8929
|
// 如果按下了 Tab 键切换
|
|
8918
8930
|
if (selectRow || actived.row) {
|
|
8919
8931
|
const activeRow = selectRow || actived.row
|
|
@@ -8961,7 +8973,7 @@ export default defineVxeComponent({
|
|
|
8961
8973
|
}
|
|
8962
8974
|
}
|
|
8963
8975
|
}
|
|
8964
|
-
} else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8976
|
+
} else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8965
8977
|
// 如果是删除键
|
|
8966
8978
|
if (!isEditStatus) {
|
|
8967
8979
|
const { delMethod } = keyboardOpts
|
|
@@ -8990,7 +9002,7 @@ export default defineVxeComponent({
|
|
|
8990
9002
|
dispatchEvent('cell-delete-value', params, evnt)
|
|
8991
9003
|
}
|
|
8992
9004
|
}
|
|
8993
|
-
} else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9005
|
+
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8994
9006
|
if (!isEditStatus) {
|
|
8995
9007
|
const { backMethod } = keyboardOpts
|
|
8996
9008
|
// 如果是删除键
|
|
@@ -9021,7 +9033,7 @@ export default defineVxeComponent({
|
|
|
9021
9033
|
}
|
|
9022
9034
|
}
|
|
9023
9035
|
}
|
|
9024
|
-
} else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
9036
|
+
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
9025
9037
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
9026
9038
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField })
|
|
9027
9039
|
if (parentRow) {
|
|
@@ -9038,7 +9050,7 @@ export default defineVxeComponent({
|
|
|
9038
9050
|
.then(() => $xeTable.scrollToRow(parentRow))
|
|
9039
9051
|
.then(() => $xeTable.triggerCurrentRowEvent(evnt, params))
|
|
9040
9052
|
}
|
|
9041
|
-
} else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
9053
|
+
} else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
9042
9054
|
if (evnt.target) {
|
|
9043
9055
|
if (isY || (hasShiftKey && isZ)) {
|
|
9044
9056
|
// 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
|
|
@@ -9050,7 +9062,7 @@ export default defineVxeComponent({
|
|
|
9050
9062
|
$xeTable.handleUndoStackEvent(evnt)
|
|
9051
9063
|
}
|
|
9052
9064
|
}
|
|
9053
|
-
} else if (keyboardConfig && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
9065
|
+
} else if (hasEnableConf(keyboardConfig, keyboardOpts) && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
9054
9066
|
const { editMode, editMethod } = keyboardOpts
|
|
9055
9067
|
// 启用编辑后,空格键功能将失效
|
|
9056
9068
|
// if (isSpacebar) {
|
|
@@ -9102,7 +9114,7 @@ export default defineVxeComponent({
|
|
|
9102
9114
|
const { actived } = editStore
|
|
9103
9115
|
if (isActivated && !filterStore.visible) {
|
|
9104
9116
|
if (!(actived.row || actived.column)) {
|
|
9105
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
9117
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
9106
9118
|
$xeTable.handlePeClAreaEvent(evnt)
|
|
9107
9119
|
}
|
|
9108
9120
|
}
|
|
@@ -9119,7 +9131,7 @@ export default defineVxeComponent({
|
|
|
9119
9131
|
const { actived } = editStore
|
|
9120
9132
|
if (isActivated && !filterStore.visible) {
|
|
9121
9133
|
if (!(actived.row || actived.column)) {
|
|
9122
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
9134
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
9123
9135
|
$xeTable.handleCyClAreaEvent(evnt)
|
|
9124
9136
|
}
|
|
9125
9137
|
}
|
|
@@ -9136,7 +9148,7 @@ export default defineVxeComponent({
|
|
|
9136
9148
|
const { actived } = editStore
|
|
9137
9149
|
if (isActivated && !filterStore.visible) {
|
|
9138
9150
|
if (!(actived.row || actived.column)) {
|
|
9139
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
9151
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
9140
9152
|
$xeTable.handleCutCellAreaEvent(evnt)
|
|
9141
9153
|
}
|
|
9142
9154
|
}
|
|
@@ -9658,11 +9670,23 @@ export default defineVxeComponent({
|
|
|
9658
9670
|
*/
|
|
9659
9671
|
getParentElem () {
|
|
9660
9672
|
const el = refElem.value
|
|
9661
|
-
if (
|
|
9662
|
-
|
|
9663
|
-
return gridEl ? gridEl.parentNode as HTMLElement : null
|
|
9673
|
+
if (!el) {
|
|
9674
|
+
return null
|
|
9664
9675
|
}
|
|
9665
|
-
|
|
9676
|
+
const parentEl = el.parentElement
|
|
9677
|
+
if (!parentEl) {
|
|
9678
|
+
return null
|
|
9679
|
+
}
|
|
9680
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
9681
|
+
return $xeGantt.getParentElem()
|
|
9682
|
+
} else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
9683
|
+
return $xeGrid.getParentElem()
|
|
9684
|
+
}
|
|
9685
|
+
// 如果是虚拟滚动条
|
|
9686
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
9687
|
+
return parentEl.parentElement
|
|
9688
|
+
}
|
|
9689
|
+
return parentEl
|
|
9666
9690
|
},
|
|
9667
9691
|
/**
|
|
9668
9692
|
* 获取父容器的高度
|
|
@@ -9670,23 +9694,30 @@ export default defineVxeComponent({
|
|
|
9670
9694
|
getParentHeight () {
|
|
9671
9695
|
const { height } = props
|
|
9672
9696
|
const el = refElem.value
|
|
9673
|
-
if (el) {
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9697
|
+
if (!el) {
|
|
9698
|
+
return 0
|
|
9699
|
+
}
|
|
9700
|
+
let parentEl = el.parentElement
|
|
9701
|
+
let parentPaddingSize = 0
|
|
9702
|
+
let parentWrapperHeight = 0
|
|
9703
|
+
if (!parentEl) {
|
|
9704
|
+
return 0
|
|
9705
|
+
}
|
|
9706
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
9707
|
+
parentWrapperHeight = $xeGantt.getParentHeight()
|
|
9708
|
+
} else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
9709
|
+
parentWrapperHeight = $xeGrid.getParentHeight()
|
|
9710
|
+
} else {
|
|
9711
|
+
// 如果是虚拟滚动条
|
|
9712
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
9713
|
+
parentEl = parentEl.parentElement
|
|
9714
|
+
}
|
|
9715
|
+
if (parentEl) {
|
|
9716
|
+
parentWrapperHeight = parentEl.clientHeight
|
|
9717
|
+
parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0
|
|
9686
9718
|
}
|
|
9687
|
-
return Math.floor(parentWrapperHeight - parentPaddingSize)
|
|
9688
9719
|
}
|
|
9689
|
-
return
|
|
9720
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize)
|
|
9690
9721
|
},
|
|
9691
9722
|
/**
|
|
9692
9723
|
* 获取需要排除的高度
|
|
@@ -10357,7 +10388,8 @@ export default defineVxeComponent({
|
|
|
10357
10388
|
*/
|
|
10358
10389
|
handleCustom () {
|
|
10359
10390
|
const { mouseConfig } = props
|
|
10360
|
-
|
|
10391
|
+
const mouseOpts = computeMouseOpts.value
|
|
10392
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10361
10393
|
if ($xeTable.clearSelected) {
|
|
10362
10394
|
$xeTable.clearSelected()
|
|
10363
10395
|
}
|
|
@@ -11490,7 +11522,7 @@ export default defineVxeComponent({
|
|
|
11490
11522
|
const { field, sortable, order } = column
|
|
11491
11523
|
if (sortable) {
|
|
11492
11524
|
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime }
|
|
11493
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
11525
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
11494
11526
|
$xeTable.handleSortEvent(evnt, params)
|
|
11495
11527
|
}
|
|
11496
11528
|
if (!order) {
|
|
@@ -11566,7 +11598,7 @@ export default defineVxeComponent({
|
|
|
11566
11598
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params)
|
|
11567
11599
|
}
|
|
11568
11600
|
}
|
|
11569
|
-
if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
11601
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
11570
11602
|
$xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params))
|
|
11571
11603
|
}
|
|
11572
11604
|
$xeTable.focus()
|
|
@@ -12315,6 +12347,7 @@ export default defineVxeComponent({
|
|
|
12315
12347
|
handleColDragSwapEvent (evnt, isSyncColumn, dragCol, prevDragCol, prevDragPos, prevDragToChild) {
|
|
12316
12348
|
const { mouseConfig } = props
|
|
12317
12349
|
const columnDragOpts = computeColumnDragOpts.value
|
|
12350
|
+
const mouseOpts = computeMouseOpts.value
|
|
12318
12351
|
const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts
|
|
12319
12352
|
const { collectColumn, fullColumnIdData } = internalData
|
|
12320
12353
|
const el = refElem.value
|
|
@@ -12487,7 +12520,7 @@ export default defineVxeComponent({
|
|
|
12487
12520
|
})
|
|
12488
12521
|
|
|
12489
12522
|
$xeTable.handleClearStack()
|
|
12490
|
-
if (mouseConfig) {
|
|
12523
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
12491
12524
|
if ($xeTable.clearSelected) {
|
|
12492
12525
|
$xeTable.clearSelected()
|
|
12493
12526
|
}
|
|
@@ -13036,14 +13069,14 @@ export default defineVxeComponent({
|
|
|
13036
13069
|
|
|
13037
13070
|
if (isRollX) {
|
|
13038
13071
|
// 如果禁用滚动
|
|
13039
|
-
if (scrollbarXOpts.visible === 'hidden') {
|
|
13072
|
+
if (scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') {
|
|
13040
13073
|
evnt.preventDefault()
|
|
13041
13074
|
return
|
|
13042
13075
|
}
|
|
13043
13076
|
}
|
|
13044
13077
|
if (isRollY) {
|
|
13045
13078
|
// 如果禁用滚动
|
|
13046
|
-
if (scrollbarYOpts.visible === 'hidden') {
|
|
13079
|
+
if (scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') {
|
|
13047
13080
|
evnt.preventDefault()
|
|
13048
13081
|
return
|
|
13049
13082
|
}
|
|
@@ -13651,10 +13684,15 @@ export default defineVxeComponent({
|
|
|
13651
13684
|
const osYBehavior = XEUtils.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior
|
|
13652
13685
|
return h('div', {
|
|
13653
13686
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
13654
|
-
class: [
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13687
|
+
class: [
|
|
13688
|
+
`vxe-table--fixed-${fixedType}-wrapper`,
|
|
13689
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
13690
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
13691
|
+
{
|
|
13692
|
+
[`x-ob--${osXBehavior}`]: osXBehavior,
|
|
13693
|
+
[`y-ob--${osYBehavior}`]: osYBehavior
|
|
13694
|
+
}
|
|
13695
|
+
]
|
|
13658
13696
|
}, [
|
|
13659
13697
|
showHeader
|
|
13660
13698
|
? h(TableHeaderComponent, {
|
|
@@ -13974,7 +14012,11 @@ export default defineVxeComponent({
|
|
|
13974
14012
|
}]
|
|
13975
14013
|
}, [
|
|
13976
14014
|
h('div', {
|
|
13977
|
-
class: [
|
|
14015
|
+
class: [
|
|
14016
|
+
'vxe-table--main-wrapper',
|
|
14017
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
14018
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`
|
|
14019
|
+
]
|
|
13978
14020
|
}, [
|
|
13979
14021
|
/**
|
|
13980
14022
|
* 表头
|
|
@@ -14032,7 +14074,7 @@ export default defineVxeComponent({
|
|
|
14032
14074
|
}
|
|
14033
14075
|
|
|
14034
14076
|
const renderVN = () => {
|
|
14035
|
-
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
|
|
14077
|
+
const { loading, stripe, useScrollbar, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules, importConfig, exportConfig, printConfig } = props
|
|
14036
14078
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData
|
|
14037
14079
|
const { teleportToWrapperElem, popupToWrapperElem, customPopupToElem } = internalData
|
|
14038
14080
|
const { leftList, rightList } = columnStore
|
|
@@ -14060,10 +14102,13 @@ export default defineVxeComponent({
|
|
|
14060
14102
|
const isContentMenu = computeIsContentMenu.value
|
|
14061
14103
|
const currLoading = reactData.isColLoading || reactData.isRowLoading || loading
|
|
14062
14104
|
const resizableOpts = computeResizableOpts.value
|
|
14063
|
-
const isArea = mouseConfig && mouseOpts.area
|
|
14105
|
+
const isArea = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
14064
14106
|
const columnDragOpts = computeColumnDragOpts.value
|
|
14065
14107
|
const scrollbarXToTop = computeScrollbarXToTop.value
|
|
14066
14108
|
const scrollbarYToLeft = computeScrollbarYToLeft.value
|
|
14109
|
+
const exportOpts = computeExportOpts.value
|
|
14110
|
+
const importOpts = computeImportOpts.value
|
|
14111
|
+
const printOpts = computePrintOpts.value
|
|
14067
14112
|
const { isCrossTableDrag } = rowDragOpts
|
|
14068
14113
|
const tbOns: {
|
|
14069
14114
|
onContextmenu: (...args: any[]) => void
|
|
@@ -14078,13 +14123,13 @@ export default defineVxeComponent({
|
|
|
14078
14123
|
}
|
|
14079
14124
|
return h('div', {
|
|
14080
14125
|
ref: refElem,
|
|
14081
|
-
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
14126
|
+
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, useScrollbar ? 'is--virtual-scrollbar' : 'is--native-scrollbar', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
14082
14127
|
[`size--${vSize}`]: vSize,
|
|
14083
14128
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
14084
14129
|
'vxe-editable': !!editConfig,
|
|
14085
14130
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
14086
14131
|
'cell--highlight': highlightCell,
|
|
14087
|
-
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
14132
|
+
'cell--selected': hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected,
|
|
14088
14133
|
'cell--area': isArea,
|
|
14089
14134
|
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
14090
14135
|
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
@@ -14298,7 +14343,7 @@ export default defineVxeComponent({
|
|
|
14298
14343
|
/**
|
|
14299
14344
|
* 导入
|
|
14300
14345
|
*/
|
|
14301
|
-
initStore.import &&
|
|
14346
|
+
initStore.import && hasEnableConf(importConfig, importOpts)
|
|
14302
14347
|
? h(TableImportPanelComponent, {
|
|
14303
14348
|
key: 'it',
|
|
14304
14349
|
defaultOptions: reactData.importParams,
|
|
@@ -14308,7 +14353,7 @@ export default defineVxeComponent({
|
|
|
14308
14353
|
/**
|
|
14309
14354
|
* 导出
|
|
14310
14355
|
*/
|
|
14311
|
-
initStore.export && (
|
|
14356
|
+
initStore.export && (hasEnableConf(exportConfig, exportOpts) || hasEnableConf(printConfig, printOpts))
|
|
14312
14357
|
? h(TableExportPanelComponent, {
|
|
14313
14358
|
key: 'et',
|
|
14314
14359
|
defaultOptions: reactData.exportParams,
|
|
@@ -14673,7 +14718,7 @@ export default defineVxeComponent({
|
|
|
14673
14718
|
})
|
|
14674
14719
|
|
|
14675
14720
|
onMounted(() => {
|
|
14676
|
-
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource } = props
|
|
14721
|
+
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource, areaConfig } = props
|
|
14677
14722
|
const { scrollXStore, scrollYStore } = internalData
|
|
14678
14723
|
const columnOpts = computeColumnOpts.value
|
|
14679
14724
|
const columnDragOpts = computeColumnDragOpts.value
|
|
@@ -14696,6 +14741,7 @@ export default defineVxeComponent({
|
|
|
14696
14741
|
const areaOpts = computeAreaOpts.value
|
|
14697
14742
|
const sortOpts = computeSortOpts.value
|
|
14698
14743
|
const filterOpts = computeFilterOpts.value
|
|
14744
|
+
const scrollbarOpts = computeScrollbarOpts.value
|
|
14699
14745
|
const { groupFields } = aggregateOpts
|
|
14700
14746
|
|
|
14701
14747
|
if ($xeGantt) {
|
|
@@ -14791,13 +14837,13 @@ export default defineVxeComponent({
|
|
|
14791
14837
|
// warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
|
|
14792
14838
|
// }
|
|
14793
14839
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
14794
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
14840
|
+
if (hasEnableConf(importConfig, importOpts) && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
14795
14841
|
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')])
|
|
14796
14842
|
}
|
|
14797
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
14843
|
+
if (hasEnableConf(exportConfig, exportOpts) && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
14798
14844
|
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')])
|
|
14799
14845
|
}
|
|
14800
|
-
if (exportConfig && XEUtils.isBoolean((exportOpts as any).isAllExpand)) {
|
|
14846
|
+
if (hasEnableConf(exportConfig, exportOpts) && XEUtils.isBoolean((exportOpts as any).isAllExpand)) {
|
|
14801
14847
|
warnLog('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded'])
|
|
14802
14848
|
}
|
|
14803
14849
|
|
|
@@ -14812,8 +14858,8 @@ export default defineVxeComponent({
|
|
|
14812
14858
|
if (rowOpts.height && !props.showOverflow) {
|
|
14813
14859
|
warnLog('vxe.error.notProp', ['table.show-overflow'])
|
|
14814
14860
|
}
|
|
14815
|
-
if (!$xeTable.
|
|
14816
|
-
if (
|
|
14861
|
+
if (!$xeTable.triggerClAaMnEvent) {
|
|
14862
|
+
if (hasEnableConf(areaConfig, areaOpts)) {
|
|
14817
14863
|
warnLog('vxe.error.notProp', ['area-config'])
|
|
14818
14864
|
}
|
|
14819
14865
|
if (props.clipConfig) {
|
|
@@ -14901,10 +14947,10 @@ export default defineVxeComponent({
|
|
|
14901
14947
|
if (columnOpts.currentMethod) {
|
|
14902
14948
|
warnLog('vxe.error.delProp', ['row-config.currentMethod', 'current-column-config.beforeSelectMethod'])
|
|
14903
14949
|
}
|
|
14904
|
-
// if ((rowOpts.isCurrent || highlightCurrentRow) &&
|
|
14950
|
+
// if ((rowOpts.isCurrent || highlightCurrentRow) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentRowOpts.isFollowSelected)) {
|
|
14905
14951
|
// warnLog('vxe.error.notConflictProp', ['row-config.isCurrent & keyboard-config.isArrow', 'current-row-config.isFollowSelected'])
|
|
14906
14952
|
// }
|
|
14907
|
-
// if ((columnOpts.isCurrent || highlightCurrentColumn) &&
|
|
14953
|
+
// if ((columnOpts.isCurrent || highlightCurrentColumn) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
14908
14954
|
// warnLog('vxe.error.notConflictProp', ['column-config.isCurrent & keyboard-config.isArrow', 'current-column-config.isFollowSelected'])
|
|
14909
14955
|
// }
|
|
14910
14956
|
|
|
@@ -14930,13 +14976,20 @@ export default defineVxeComponent({
|
|
|
14930
14976
|
// if (props.editRules && !$xeTable.validate) {
|
|
14931
14977
|
// errLog('vxe.error.reqModule', ['Validator'])
|
|
14932
14978
|
// }
|
|
14933
|
-
// if ((checkboxOpts.range ||
|
|
14979
|
+
// if ((checkboxOpts.range || hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts)) && !$xeTable.handleCellMousedownEvent) {
|
|
14934
14980
|
// errLog('vxe.error.reqModule', ['Keyboard'])
|
|
14935
14981
|
// }
|
|
14936
|
-
// if ((
|
|
14982
|
+
// if (hasEnableConf(printConfig, printOpts) || hasEnableConf(importConfig, importOpts) || hasEnableConf(exportConfig, exportOpts)) && !$xeTable.exportData) {
|
|
14937
14983
|
// errLog('vxe.error.reqModule', ['Export'])
|
|
14938
14984
|
// }
|
|
14939
14985
|
|
|
14986
|
+
if (scrollbarOpts.x) {
|
|
14987
|
+
warnLog('vxe.error.delProp', ['scrollbar-config.x', 'scrollbar-config.xConfig'])
|
|
14988
|
+
}
|
|
14989
|
+
if (scrollbarOpts.y) {
|
|
14990
|
+
warnLog('vxe.error.delProp', ['scrollbar-config.y', 'scrollbar-config.yConfig'])
|
|
14991
|
+
}
|
|
14992
|
+
|
|
14940
14993
|
Object.assign(scrollYStore, {
|
|
14941
14994
|
startIndex: 0,
|
|
14942
14995
|
endIndex: 0,
|