vxe-table 3.24.4 → 3.25.0-beta.0
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 +15 -2
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +3 -2
- package/es/table/module/edit/mixin.js +5 -4
- package/es/table/module/export/mixin.js +6 -4
- package/es/table/module/filter/mixin.js +2 -2
- package/es/table/module/keyboard/mixin.js +4 -3
- package/es/table/module/menu/mixin.js +3 -3
- package/es/table/render/index.js +5 -3
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/methods.js +76 -48
- package/es/table/src/table.js +29 -26
- package/es/table/src/util.js +6 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +14 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +129 -80
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +2 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +4 -3
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +9 -3
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +1 -1
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +4 -3
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/render/index.js +4 -2
- 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/methods.js +32 -30
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +32 -25
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +8 -2
- package/lib/table/src/util.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/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 +16 -2
- package/packages/table/module/custom/panel.ts +3 -2
- package/packages/table/module/edit/mixin.ts +5 -4
- package/packages/table/module/export/mixin.ts +6 -4
- package/packages/table/module/filter/mixin.ts +2 -2
- package/packages/table/module/keyboard/mixin.ts +4 -3
- package/packages/table/module/menu/mixin.ts +3 -3
- package/packages/table/render/index.ts +5 -3
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/methods.ts +73 -46
- package/packages/table/src/table.ts +29 -26
- package/packages/table/src/util.ts +6 -3
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1791617048832.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/es/{iconfont.1791617048832.woff → iconfont.1791880417274.woff} +0 -0
- /package/es/{iconfont.1791617048832.woff2 → iconfont.1791880417274.woff2} +0 -0
- /package/lib/{iconfont.1791617048832.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/lib/{iconfont.1791617048832.woff → iconfont.1791880417274.woff} +0 -0
- /package/lib/{iconfont.1791617048832.woff2 → iconfont.1791880417274.woff2} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.25.0-beta.0",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vue-i18n": "^8.15.1",
|
|
66
66
|
"vue-router": "^3.5.1",
|
|
67
67
|
"vue-template-compiler": "2.6.14",
|
|
68
|
-
"vxe-pc-ui": "3.
|
|
68
|
+
"vxe-pc-ui": "3.20.0"
|
|
69
69
|
},
|
|
70
70
|
"vetur": {
|
|
71
71
|
"tags": "helper/vetur/tags.json",
|
|
@@ -2,7 +2,7 @@ import { CreateElement, VNode, PropType } from 'vue'
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
5
|
-
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit } from '../../ui/src/dom'
|
|
5
|
+
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit, hasClass } from '../../ui/src/dom'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -483,13 +483,27 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
483
483
|
}
|
|
484
484
|
return 0
|
|
485
485
|
},
|
|
486
|
+
getParentElem () {
|
|
487
|
+
const $xeGrid = this
|
|
488
|
+
|
|
489
|
+
const el = $xeGrid.$refs.refElem as HTMLDivElement
|
|
490
|
+
if (!el) {
|
|
491
|
+
return null
|
|
492
|
+
}
|
|
493
|
+
let parentEl = el.parentElement
|
|
494
|
+
// 如果是虚拟滚动条
|
|
495
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
496
|
+
parentEl = parentEl.parentElement
|
|
497
|
+
}
|
|
498
|
+
return parentEl
|
|
499
|
+
},
|
|
486
500
|
getParentHeight () {
|
|
487
501
|
const $xeGrid = this
|
|
488
502
|
const reactData = $xeGrid.reactData
|
|
489
503
|
|
|
490
504
|
const el = $xeGrid.$refs.refElem as HTMLDivElement
|
|
491
505
|
if (el) {
|
|
492
|
-
const parentEl =
|
|
506
|
+
const parentEl = $xeGrid.getParentElem()
|
|
493
507
|
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - $xeGrid.getExcludeHeight()
|
|
494
508
|
}
|
|
495
509
|
return 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateElement, VNode, PropType } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
|
-
import { formatText } from '../../../ui/src/utils'
|
|
4
|
+
import { formatText, hasEnableConf } from '../../../ui/src/utils'
|
|
5
5
|
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom'
|
|
6
6
|
import { createComponentLog } from '../../../ui/src/log'
|
|
7
7
|
import XEUtils from 'xe-utils'
|
|
@@ -443,6 +443,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
443
443
|
const { customColumnList } = tableReactData
|
|
444
444
|
const { collectColumn } = tableInternalData
|
|
445
445
|
const customOpts = $xeTable.computeCustomOpts
|
|
446
|
+
const mouseOpts = $xeTable.computeMouseOpts
|
|
446
447
|
const { immediate } = customOpts
|
|
447
448
|
const trEl = evnt.currentTarget as HTMLElement
|
|
448
449
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
@@ -595,7 +596,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
595
596
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn)
|
|
596
597
|
}
|
|
597
598
|
|
|
598
|
-
if (mouseConfig) {
|
|
599
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
599
600
|
if ($xeTable.clearSelected) {
|
|
600
601
|
$xeTable.clearSelected()
|
|
601
602
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
|
-
import { isEnableConf } from '../../../ui/src/utils'
|
|
3
|
+
import { hasEnableConf, isEnableConf } from '../../../ui/src/utils'
|
|
4
4
|
import { getCellValue, setCellValue, getRowid } from '../../src/util'
|
|
5
5
|
import { removeClass, addClass } from '../../../ui/src/dom'
|
|
6
6
|
import { createComponentLog } from '../../../ui/src/log'
|
|
@@ -411,6 +411,7 @@ function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
411
411
|
const { editConfig, mouseConfig } = props
|
|
412
412
|
const { editStore, tableColumn } = reactData
|
|
413
413
|
const editOpts = $xeTable.computeEditOpts
|
|
414
|
+
const mouseOpts = $xeTable.computeMouseOpts
|
|
414
415
|
const { mode } = editOpts
|
|
415
416
|
const { actived, focused } = editStore
|
|
416
417
|
const { row, column } = params
|
|
@@ -426,7 +427,7 @@ function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
426
427
|
// 判断是否禁用编辑
|
|
427
428
|
let type: 'edit-disabled' | 'edit-activated' = 'edit-disabled'
|
|
428
429
|
if (!beforeEditMethod || beforeEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })) {
|
|
429
|
-
if (mouseConfig) {
|
|
430
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
430
431
|
$xeTable.clearSelected()
|
|
431
432
|
if ($xeTable.clearCellAreas) {
|
|
432
433
|
$xeTable.clearCellAreas()
|
|
@@ -483,7 +484,7 @@ function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
483
484
|
}
|
|
484
485
|
} else {
|
|
485
486
|
const { column: oldColumn } = actived
|
|
486
|
-
if (mouseConfig) {
|
|
487
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
487
488
|
$xeTable.clearSelected()
|
|
488
489
|
if ($xeTable.clearCellAreas) {
|
|
489
490
|
$xeTable.clearCellAreas()
|
|
@@ -1145,7 +1146,7 @@ export default {
|
|
|
1145
1146
|
const editOpts = $xeTable.computeEditOpts
|
|
1146
1147
|
const { actived, selected } = editStore
|
|
1147
1148
|
const { row, column } = params
|
|
1148
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected
|
|
1149
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected
|
|
1149
1150
|
const selectMethod = () => {
|
|
1150
1151
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
1151
1152
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util'
|
|
4
|
-
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils'
|
|
4
|
+
import { parseFile, formatText, eqEmptyValue, hasEnableConf } from '../../../ui/src/utils'
|
|
5
5
|
import { hasClass, toCssUnit } from '../../../ui/src/dom'
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
7
7
|
import { createComponentLog } from '../../../ui/src/log'
|
|
@@ -2029,7 +2029,7 @@ export default {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
return
|
|
2031
2031
|
}
|
|
2032
|
-
if (!importConfig) {
|
|
2032
|
+
if (!hasEnableConf(importConfig, importOpts)) {
|
|
2033
2033
|
errLog('vxe.error.reqProp', ['import-config'])
|
|
2034
2034
|
}
|
|
2035
2035
|
// 处理类型
|
|
@@ -2070,12 +2070,13 @@ export default {
|
|
|
2070
2070
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
2071
2071
|
const props = $xeTable
|
|
2072
2072
|
|
|
2073
|
+
const { exportConfig } = props
|
|
2073
2074
|
const exportOpts = $xeTable.computeExportOpts
|
|
2074
2075
|
const defOpts = Object.assign({
|
|
2075
2076
|
message: true,
|
|
2076
2077
|
types: XEUtils.keys(exportOpts._typeMaps)
|
|
2077
2078
|
}, exportOpts, options)
|
|
2078
|
-
if (!
|
|
2079
|
+
if (!hasEnableConf(exportConfig, exportOpts)) {
|
|
2079
2080
|
errLog('vxe.error.reqProp', ['export-config'])
|
|
2080
2081
|
}
|
|
2081
2082
|
return handleExportAndPrint($xeTable, defOpts)
|
|
@@ -2085,11 +2086,12 @@ export default {
|
|
|
2085
2086
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
2086
2087
|
const props = $xeTable
|
|
2087
2088
|
|
|
2089
|
+
const { printConfig } = props
|
|
2088
2090
|
const printOpts = $xeTable.computePrintOpts
|
|
2089
2091
|
const defOpts = Object.assign({
|
|
2090
2092
|
message: true
|
|
2091
2093
|
}, printOpts, options)
|
|
2092
|
-
if (!
|
|
2094
|
+
if (!hasEnableConf(printConfig, printOpts)) {
|
|
2093
2095
|
errLog('vxe.error.reqProp', ['print-config'])
|
|
2094
2096
|
}
|
|
2095
2097
|
return handleExportAndPrint($xeTable, defOpts, true)
|
|
@@ -2,7 +2,7 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import { toFilters, handleFieldOrColumn, getRefElem } from '../../src/util'
|
|
4
4
|
import { toCssUnit, triggerEvent, updatePanelPlacement } from '../../../ui/src/dom'
|
|
5
|
-
import { isEnableConf } from '../../../ui/src/utils'
|
|
5
|
+
import { hasEnableConf, isEnableConf } from '../../../ui/src/utils'
|
|
6
6
|
|
|
7
7
|
import type { VxeTableConstructor, VxeTableDefines, TableReactData, TableInternalData, VxeColumnPropTypes, VxeTablePrivateMethods } from '../../../../types'
|
|
8
8
|
|
|
@@ -428,7 +428,7 @@ export default {
|
|
|
428
428
|
$xeTable.handleTableData(true)
|
|
429
429
|
$xeTable.checkSelectionStatus()
|
|
430
430
|
}
|
|
431
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
431
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
432
432
|
$xeTable.handleFilterEvent(evnt as Event, params)
|
|
433
433
|
}
|
|
434
434
|
if (evnt) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { getRefElem } from '../../src/util'
|
|
3
3
|
import { getAbsolutePos, addClass, removeClass, hasControlKey } from '../../../ui/src/dom'
|
|
4
|
+
import { hasEnableConf } from '../../../ui/src/utils'
|
|
4
5
|
|
|
5
6
|
import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, TableReactData, TableInternalData } from '../../../../types'
|
|
6
7
|
|
|
@@ -492,13 +493,13 @@ export default {
|
|
|
492
493
|
const checkboxOpts = $xeTable.computeCheckboxOpts
|
|
493
494
|
const mouseOpts = $xeTable.computeMouseOpts
|
|
494
495
|
const editOpts = $xeTable.computeEditOpts
|
|
495
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
496
|
-
return $xeTable.
|
|
496
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
|
|
497
|
+
return $xeTable.triggerClAaMnEvent(evnt, params)
|
|
497
498
|
} else {
|
|
498
499
|
if (checkboxConfig && checkboxOpts.range) {
|
|
499
500
|
handleCheckboxRangeEvent($xeTable, evnt, params)
|
|
500
501
|
}
|
|
501
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
502
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
502
503
|
if (!editConfig || editOpts.mode === 'cell') {
|
|
503
504
|
$xeTable.handleSelected(params, evnt)
|
|
504
505
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
3
|
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from '../../../ui/src/dom'
|
|
4
|
-
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
4
|
+
import { isEnableConf, hasChildrenList, hasEnableConf } from '../../../ui/src/utils'
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log'
|
|
6
6
|
|
|
7
7
|
import type { VxeComponentStyleType } from 'vxe-pc-ui'
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
const type = 'body'
|
|
94
94
|
const params: any = { source: 'table', type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: visibleColumn.slice(0), $event: evnt }
|
|
95
95
|
// 如果开启单元格区域
|
|
96
|
-
if (mouseConfig && mouseOpts.area) {
|
|
96
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
97
97
|
const activeArea = $xeTable.getActiveCellArea()
|
|
98
98
|
if (activeArea && activeArea.row && activeArea.column) {
|
|
99
99
|
params.row = activeArea.row
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
101
101
|
$xeTable.handleOpenMenuEvent(evnt, type, params)
|
|
102
102
|
return
|
|
103
103
|
}
|
|
104
|
-
} else if (mouseConfig && mouseOpts.selected) {
|
|
104
|
+
} else if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
105
105
|
// 如果启用键盘导航且已选中单元格
|
|
106
106
|
if (selected.row && selected.column) {
|
|
107
107
|
params.row = selected.row
|
|
@@ -2,7 +2,7 @@ import { CreateElement, VNode } from 'vue'
|
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
4
|
import { getCellValue, setCellValue } from '../src/util'
|
|
5
|
-
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils'
|
|
5
|
+
import { getFuncText, formatText, isEmptyValue, hasEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { getOnName, getModelEvent, getChangeEvent, hasInputType } from '../../ui/src/vn'
|
|
7
7
|
import { createComponentLog } from '../../ui/src/log'
|
|
8
8
|
|
|
@@ -919,9 +919,10 @@ function getNativeInputRenderCellVNs (h: CreateElement, cellValue: any, labelVNs
|
|
|
919
919
|
const { name } = renderOpts
|
|
920
920
|
const tableProps = $table
|
|
921
921
|
const { editConfig, mouseConfig } = tableProps
|
|
922
|
+
const mouseOpts = $table.computeMouseOpts
|
|
922
923
|
let isColSelected = false
|
|
923
924
|
let isActiveCellArea = false
|
|
924
|
-
if (editConfig && mouseConfig) {
|
|
925
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
925
926
|
const tableReactData = $table as unknown as TableReactData
|
|
926
927
|
const { editStore } = tableReactData
|
|
927
928
|
const { selected } = editStore
|
|
@@ -954,9 +955,10 @@ function getInputRenderCellVNs (h: CreateElement, cellValue: any, labelVNs: VNod
|
|
|
954
955
|
const { $table, row, column } = renderParams
|
|
955
956
|
const tableProps = $table
|
|
956
957
|
const { editConfig, mouseConfig } = tableProps
|
|
958
|
+
const mouseOpts = $table.computeMouseOpts
|
|
957
959
|
let isColSelected = false
|
|
958
960
|
let isActiveCellArea = false
|
|
959
|
-
if (editConfig && mouseConfig) {
|
|
961
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
960
962
|
const tableReactData = $table as unknown as TableReactData
|
|
961
963
|
const { editStore } = tableReactData
|
|
962
964
|
const editOpts = $table.computeEditOpts
|
|
@@ -2,7 +2,7 @@ import { PropType, CreateElement } from 'vue'
|
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
4
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
5
|
-
import { isEnableConf, getClass, getDefaultConfig } from '../../ui/src/utils'
|
|
5
|
+
import { isEnableConf, getClass, getDefaultConfig, hasEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { getRowid, createHandleGetRowId, getCellRestHeight } from './util'
|
|
7
7
|
import { updateCellTitle } from '../../ui/src/dom'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -227,7 +227,7 @@ function renderTdColumn (
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
// 按下事件处理
|
|
230
|
-
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
230
|
+
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
231
231
|
tdOns.mousedown = (evnt: MouseEvent) => {
|
|
232
232
|
$xeTable.triggerCellMousedownEvent(evnt, cellParams)
|
|
233
233
|
}
|
|
@@ -422,7 +422,7 @@ function renderTdColumn (
|
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
let showAreaRowStatus = false
|
|
425
|
-
if (mouseConfig && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
425
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
426
426
|
showAreaRowStatus = true
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -936,7 +936,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
936
936
|
h('div', {
|
|
937
937
|
class: 'vxe-table--checkbox-range'
|
|
938
938
|
}),
|
|
939
|
-
mouseConfig && mouseOpts.area
|
|
939
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
940
940
|
? h('div', {
|
|
941
941
|
class: 'vxe-table--cell-area',
|
|
942
942
|
attrs: {
|
|
@@ -2,7 +2,7 @@ import { PropType, CreateElement } from 'vue'
|
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
4
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
5
|
-
import { isEnableConf, getClass, getDefaultConfig } from '../../ui/src/utils'
|
|
5
|
+
import { isEnableConf, getClass, getDefaultConfig, hasEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
@@ -34,6 +34,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
|
|
|
34
34
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight
|
|
35
35
|
const headerCellOpts = $xeTable.computeHeaderCellOpts
|
|
36
36
|
const rendererOpts = $xeTable.computeRendererOpts
|
|
37
|
+
const mouseOpts = $xeTable.computeMouseOpts
|
|
37
38
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight
|
|
38
39
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
|
|
39
40
|
const isLastRow = _rowIndex === headerGroups.length - 1
|
|
@@ -125,7 +126,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
|
|
|
125
126
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams))
|
|
126
127
|
}
|
|
127
128
|
// 按下事件处理
|
|
128
|
-
if (mouseConfig || isColDragCell) {
|
|
129
|
+
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
129
130
|
thOns.mousedown = (evnt: any) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams)
|
|
130
131
|
}
|
|
131
132
|
// 拖拽列事件
|
|
@@ -567,7 +568,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
567
568
|
ref: 'refHeaderTHead'
|
|
568
569
|
}, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList, renderColumnList))
|
|
569
570
|
]),
|
|
570
|
-
mouseConfig && mouseOpts.area
|
|
571
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
571
572
|
? h('div', {
|
|
572
573
|
class: 'vxe-table--cell-area',
|
|
573
574
|
attrs: {
|