vxe-table 4.16.2 → 4.16.4
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 +5 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/menu/hook.js +4 -2
- package/es/table/render/index.js +4 -3
- package/es/table/src/body.js +12 -14
- package/es/table/src/table.js +27 -15
- package/es/table/style.css +0 -4
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +0 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +6 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +35 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/menu/hook.js +6 -0
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/render/index.js +6 -3
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +11 -13
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +4 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +0 -4
- package/lib/table/style/style.min.css +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/vxe-table/style/style.css +0 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +5 -1
- package/packages/table/module/menu/hook.ts +5 -2
- package/packages/table/render/index.ts +27 -26
- package/packages/table/src/body.ts +11 -13
- package/packages/table/src/table.ts +26 -10
- package/packages/ui/src/vn.ts +3 -2
- package/styles/components/table.scss +0 -1
- /package/es/{iconfont.1756452373591.ttf → iconfont.1756734897558.ttf} +0 -0
- /package/es/{iconfont.1756452373591.woff → iconfont.1756734897558.woff} +0 -0
- /package/es/{iconfont.1756452373591.woff2 → iconfont.1756734897558.woff2} +0 -0
- /package/lib/{iconfont.1756452373591.ttf → iconfont.1756734897558.ttf} +0 -0
- /package/lib/{iconfont.1756452373591.woff → iconfont.1756734897558.woff} +0 -0
- /package/lib/{iconfont.1756452373591.woff2 → iconfont.1756734897558.woff2} +0 -0
|
@@ -148,6 +148,9 @@ hooks.add('tableMenuModule', {
|
|
|
148
148
|
* 快捷菜单事件处理
|
|
149
149
|
*/
|
|
150
150
|
handleGlobalContextmenuEvent (evnt) {
|
|
151
|
+
const $xeGrid = $xeTable.xeGrid
|
|
152
|
+
const $xeGantt = $xeTable.xeGantt
|
|
153
|
+
|
|
151
154
|
const { mouseConfig, menuConfig } = props
|
|
152
155
|
const { editStore, ctxMenuStore } = reactData
|
|
153
156
|
const { visibleColumn } = internalData
|
|
@@ -165,7 +168,7 @@ hooks.add('tableMenuModule', {
|
|
|
165
168
|
}
|
|
166
169
|
if (internalData._keyCtx) {
|
|
167
170
|
const type = 'body'
|
|
168
|
-
const params: any = { type, $table: $xeTable, keyboard: true, columns: visibleColumn.slice(0), $event: evnt }
|
|
171
|
+
const params: any = { type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: visibleColumn.slice(0), $event: evnt }
|
|
169
172
|
// 如果开启单元格区域
|
|
170
173
|
if (mouseConfig && mouseOpts.area) {
|
|
171
174
|
const activeArea = $xeTable.getActiveCellArea()
|
|
@@ -192,7 +195,7 @@ hooks.add('tableMenuModule', {
|
|
|
192
195
|
// target=td|th,直接向上找 table 去匹配即可
|
|
193
196
|
return target.parentNode.parentNode.parentNode.getAttribute('xid') === xID
|
|
194
197
|
})
|
|
195
|
-
const params: any = { type: layout, $table: $xeTable, columns: visibleColumn.slice(0), $event: evnt }
|
|
198
|
+
const params: any = { type: layout, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, columns: visibleColumn.slice(0), $event: evnt }
|
|
196
199
|
if (columnTargetNode.flag) {
|
|
197
200
|
const cell = columnTargetNode.targetElem
|
|
198
201
|
const columnNodeRest = $xeTable.getColumnNode(cell)
|
|
@@ -56,7 +56,7 @@ function handleConfirmFilter (params: any, checked: any, option: any) {
|
|
|
56
56
|
$panel.changeOption({}, checked, option)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
function getNativeAttrs (renderOpts:
|
|
59
|
+
function getNativeAttrs (renderOpts: VxeGlobalRendererHandles.RenderTableCellOptions) {
|
|
60
60
|
let { name, attrs } = renderOpts
|
|
61
61
|
if (name === 'input') {
|
|
62
62
|
attrs = Object.assign({ type: 'text' }, attrs)
|
|
@@ -83,7 +83,7 @@ function getCellEditProps (renderOpts: VxeColumnPropTypes.EditRender, params: Vx
|
|
|
83
83
|
return XEUtils.assign({ immediate: getInputImmediateModel(renderOpts) }, defaultCompProps, defaultProps, renderOpts.props, { [componentDefaultModelProp]: value })
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function getCellEditFilterProps (renderOpts:
|
|
86
|
+
function getCellEditFilterProps (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any, value: any, defaultProps?: any) {
|
|
87
87
|
return XEUtils.assign({}, defaultCompProps, defaultProps, renderOpts.props, { [componentDefaultModelProp]: value })
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -91,7 +91,7 @@ function isImmediateCell (renderOpts: VxeColumnPropTypes.EditRender, params: any
|
|
|
91
91
|
return params.$type === 'cell' || getInputImmediateModel(renderOpts)
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function getCellLabelVNs (renderOpts:
|
|
94
|
+
function getCellLabelVNs (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any, cellLabel: any, opts?: {
|
|
95
95
|
class?: string
|
|
96
96
|
}) {
|
|
97
97
|
const { placeholder } = renderOpts
|
|
@@ -115,7 +115,7 @@ function getCellLabelVNs (renderOpts: any, params: any, cellLabel: any, opts?: {
|
|
|
115
115
|
* @param modelFunc
|
|
116
116
|
* @param changeFunc
|
|
117
117
|
*/
|
|
118
|
-
function getNativeElementOns (renderOpts:
|
|
118
|
+
function getNativeElementOns (renderOpts: VxeGlobalRendererHandles.RenderTableCellOptions | VxeGlobalRendererHandles.RenderTableFilterOptions, params: any, eFns?: {
|
|
119
119
|
model: (evnt: Event) => void
|
|
120
120
|
change?: (evnt: Event) => void
|
|
121
121
|
blur?: (evnt: Event) => void
|
|
@@ -172,7 +172,7 @@ const blurEvent = 'blur'
|
|
|
172
172
|
* @param modelFunc
|
|
173
173
|
* @param changeFunc
|
|
174
174
|
*/
|
|
175
|
-
function getComponentOns (renderOpts:
|
|
175
|
+
function getComponentOns (renderOpts: VxeGlobalRendererHandles.RenderTableCellOptions | VxeGlobalRendererHandles.RenderTableFilterOptions, params: any, eFns?: {
|
|
176
176
|
model: (cellValue: any) => void
|
|
177
177
|
change?: (...args: any[]) => void
|
|
178
178
|
blur?: (...args: any[]) => void
|
|
@@ -252,7 +252,7 @@ function getEditOns (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions
|
|
|
252
252
|
})
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
function getFilterOns (renderOpts:
|
|
255
|
+
function getFilterOns (renderOpts: VxeGlobalRendererHandles.RenderTableFilterOptions, params: any, option: any) {
|
|
256
256
|
return getComponentOns(renderOpts, params, {
|
|
257
257
|
model (value: any) {
|
|
258
258
|
// 处理 model 值双向绑定
|
|
@@ -267,7 +267,7 @@ function getFilterOns (renderOpts: any, params: any, option: any) {
|
|
|
267
267
|
})
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
function getNativeEditOns (renderOpts:
|
|
270
|
+
function getNativeEditOns (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
271
271
|
const { $table, row, column } = params
|
|
272
272
|
const { model } = column
|
|
273
273
|
return getNativeElementOns(renderOpts, params, {
|
|
@@ -302,7 +302,7 @@ function getNativeEditOns (renderOpts: any, params: any) {
|
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
function getNativeFilterOns (renderOpts:
|
|
305
|
+
function getNativeFilterOns (renderOpts: VxeGlobalRendererHandles.RenderTableFilterOptions, params: any, option: any) {
|
|
306
306
|
return getNativeElementOns(renderOpts, params, {
|
|
307
307
|
model (evnt) {
|
|
308
308
|
// 处理 model 值双向绑定
|
|
@@ -324,12 +324,12 @@ function getNativeFilterOns (renderOpts: any, params: any, option: any) {
|
|
|
324
324
|
* 单元格可编辑渲染-原生的标签
|
|
325
325
|
* input、textarea、select
|
|
326
326
|
*/
|
|
327
|
-
function nativeEditRender (renderOpts:
|
|
327
|
+
function nativeEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
328
328
|
const { row, column } = params
|
|
329
329
|
const { name } = renderOpts
|
|
330
330
|
const cellValue = isImmediateCell(renderOpts, params) ? getCellValue(row, column) : column.model.value
|
|
331
331
|
return [
|
|
332
|
-
h(name
|
|
332
|
+
h(`${name}`, {
|
|
333
333
|
class: `vxe-default-${name}`,
|
|
334
334
|
...getNativeAttrs(renderOpts),
|
|
335
335
|
value: cellValue,
|
|
@@ -338,7 +338,7 @@ function nativeEditRender (renderOpts: any, params: any) {
|
|
|
338
338
|
]
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
function buttonCellRender (renderOpts:
|
|
341
|
+
function buttonCellRender (renderOpts: VxeGlobalRendererHandles.RenderTableCellOptions, params: any) {
|
|
342
342
|
return [
|
|
343
343
|
h(getDefaultComponent(renderOpts), {
|
|
344
344
|
...getCellEditProps(renderOpts, params, null),
|
|
@@ -401,7 +401,7 @@ function oldEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOpti
|
|
|
401
401
|
* 已废弃
|
|
402
402
|
* @deprecated
|
|
403
403
|
*/
|
|
404
|
-
function oldButtonEditRender (renderOpts:
|
|
404
|
+
function oldButtonEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
405
405
|
return [
|
|
406
406
|
h(getComponent('vxe-button'), {
|
|
407
407
|
...getCellEditProps(renderOpts, params, null),
|
|
@@ -414,11 +414,12 @@ function oldButtonEditRender (renderOpts: any, params: any) {
|
|
|
414
414
|
* 已废弃
|
|
415
415
|
* @deprecated
|
|
416
416
|
*/
|
|
417
|
-
function oldButtonsEditRender (renderOpts:
|
|
418
|
-
|
|
417
|
+
function oldButtonsEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
418
|
+
const { children } = renderOpts
|
|
419
|
+
return children ? children.map((childRenderOpts: any) => oldButtonEditRender(childRenderOpts, params)[0]) : []
|
|
419
420
|
}
|
|
420
421
|
|
|
421
|
-
function renderNativeOptgroups (renderOpts:
|
|
422
|
+
function renderNativeOptgroups (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any, renderOptionsMethods: any) {
|
|
422
423
|
const { optionGroups, optionGroupProps = {} } = renderOpts
|
|
423
424
|
const groupOptions = optionGroupProps.options || 'options'
|
|
424
425
|
const groupLabel = optionGroupProps.label || 'label'
|
|
@@ -436,7 +437,7 @@ function renderNativeOptgroups (renderOpts: any, params: any, renderOptionsMetho
|
|
|
436
437
|
/**
|
|
437
438
|
* 渲染原生的 option 标签
|
|
438
439
|
*/
|
|
439
|
-
function renderNativeOptions (options: any, renderOpts:
|
|
440
|
+
function renderNativeOptions (options: any, renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
440
441
|
const { optionProps = {} } = renderOpts
|
|
441
442
|
const { row, column } = params
|
|
442
443
|
const labelProp = optionProps.label || 'label'
|
|
@@ -457,12 +458,12 @@ function renderNativeOptions (options: any, renderOpts: any, params: any) {
|
|
|
457
458
|
return []
|
|
458
459
|
}
|
|
459
460
|
|
|
460
|
-
function nativeFilterRender (renderOpts:
|
|
461
|
+
function nativeFilterRender (renderOpts: VxeGlobalRendererHandles.RenderTableFilterOptions, params: any) {
|
|
461
462
|
const { column } = params
|
|
462
463
|
const { name } = renderOpts
|
|
463
464
|
const attrs = getNativeAttrs(renderOpts)
|
|
464
465
|
return column.filters.map((option: any, oIndex: any) => {
|
|
465
|
-
return h(name
|
|
466
|
+
return h(`${name}`, {
|
|
466
467
|
key: oIndex,
|
|
467
468
|
class: `vxe-default-${name}`,
|
|
468
469
|
...attrs,
|
|
@@ -472,7 +473,7 @@ function nativeFilterRender (renderOpts: any, params: any) {
|
|
|
472
473
|
})
|
|
473
474
|
}
|
|
474
475
|
|
|
475
|
-
function defaultFilterRender (renderOpts:
|
|
476
|
+
function defaultFilterRender (renderOpts: VxeGlobalRendererHandles.RenderTableFilterOptions, params: any) {
|
|
476
477
|
const { column } = params
|
|
477
478
|
return column.filters.map((option: any, oIndex: any) => {
|
|
478
479
|
const optionValue = option.data
|
|
@@ -488,7 +489,7 @@ function defaultFilterRender (renderOpts: any, params: any) {
|
|
|
488
489
|
* 已废弃
|
|
489
490
|
* @deprecated
|
|
490
491
|
*/
|
|
491
|
-
function oldFilterRender (renderOpts:
|
|
492
|
+
function oldFilterRender (renderOpts: VxeGlobalRendererHandles.RenderTableFilterOptions, params: any) {
|
|
492
493
|
const { column } = params
|
|
493
494
|
return column.filters.map((option: any, oIndex: any) => {
|
|
494
495
|
const optionValue = option.data
|
|
@@ -514,7 +515,7 @@ function handleInputFilterMethod ({ option, row, column }: any) {
|
|
|
514
515
|
return XEUtils.toValueString(cellValue).indexOf(data) > -1
|
|
515
516
|
}
|
|
516
517
|
|
|
517
|
-
function nativeSelectEditRender (renderOpts:
|
|
518
|
+
function nativeSelectEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
518
519
|
return [
|
|
519
520
|
h('select', {
|
|
520
521
|
class: 'vxe-default-select',
|
|
@@ -525,7 +526,7 @@ function nativeSelectEditRender (renderOpts: any, params: any) {
|
|
|
525
526
|
]
|
|
526
527
|
}
|
|
527
528
|
|
|
528
|
-
function defaultSelectEditRender (renderOpts:
|
|
529
|
+
function defaultSelectEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
529
530
|
const { row, column } = params
|
|
530
531
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
531
532
|
const cellValue = getCellValue(row, column)
|
|
@@ -537,7 +538,7 @@ function defaultSelectEditRender (renderOpts: any, params: any) {
|
|
|
537
538
|
]
|
|
538
539
|
}
|
|
539
540
|
|
|
540
|
-
function defaultTableOrTreeSelectEditRender (renderOpts:
|
|
541
|
+
function defaultTableOrTreeSelectEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
541
542
|
const { row, column } = params
|
|
542
543
|
const { options, optionProps } = renderOpts
|
|
543
544
|
const cellValue = getCellValue(row, column)
|
|
@@ -553,7 +554,7 @@ function defaultTableOrTreeSelectEditRender (renderOpts: any, params: any) {
|
|
|
553
554
|
* 已废弃
|
|
554
555
|
* @deprecated
|
|
555
556
|
*/
|
|
556
|
-
function oldSelectEditRender (renderOpts:
|
|
557
|
+
function oldSelectEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: any) {
|
|
557
558
|
const { row, column } = params
|
|
558
559
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
559
560
|
const cellValue = getCellValue(row, column)
|
|
@@ -565,7 +566,7 @@ function oldSelectEditRender (renderOpts: any, params: any) {
|
|
|
565
566
|
]
|
|
566
567
|
}
|
|
567
568
|
|
|
568
|
-
function getSelectCellValue (renderOpts:
|
|
569
|
+
function getSelectCellValue (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, { row, column }: any) {
|
|
569
570
|
const { options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts
|
|
570
571
|
const cellValue = XEUtils.get(row, column.field)
|
|
571
572
|
let selectItem: any
|
|
@@ -600,7 +601,7 @@ function handleExportSelectMethod (params: any) {
|
|
|
600
601
|
return options.original ? getCellValue(row, column) : getSelectCellValue(column.editRender || column.cellRender, params)
|
|
601
602
|
}
|
|
602
603
|
|
|
603
|
-
function getTreeSelectCellValue (renderOpts:
|
|
604
|
+
function getTreeSelectCellValue (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, { row, column }: any) {
|
|
604
605
|
const { options, optionProps = {} } = renderOpts
|
|
605
606
|
const cellValue = XEUtils.get(row, column.field)
|
|
606
607
|
const labelProp = optionProps.label || 'label'
|
|
@@ -194,14 +194,13 @@ export default defineVxeComponent({
|
|
|
194
194
|
// hover 进入事件
|
|
195
195
|
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
196
196
|
tdOns.onMouseenter = (evnt: MouseEvent) => {
|
|
197
|
-
if (isVMScrollProcess()) {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
$xeTable.triggerBodyTooltipEvent(evnt, cellParams)
|
|
197
|
+
if (!isVMScrollProcess()) {
|
|
198
|
+
if (showTitle) {
|
|
199
|
+
updateCellTitle(evnt.currentTarget, column)
|
|
200
|
+
} else if (showTooltip || showAllTip) {
|
|
201
|
+
// 如果配置了显示 tooltip
|
|
202
|
+
$xeTable.triggerBodyTooltipEvent(evnt, cellParams)
|
|
203
|
+
}
|
|
205
204
|
}
|
|
206
205
|
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt)
|
|
207
206
|
}
|
|
@@ -209,11 +208,10 @@ export default defineVxeComponent({
|
|
|
209
208
|
// hover 退出事件
|
|
210
209
|
if (showTooltip || showAllTip || tooltipConfig) {
|
|
211
210
|
tdOns.onMouseleave = (evnt: MouseEvent) => {
|
|
212
|
-
if (isVMScrollProcess()) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
$xeTable.handleTargetLeaveEvent(evnt)
|
|
211
|
+
if (!isVMScrollProcess()) {
|
|
212
|
+
if (showTooltip || showAllTip) {
|
|
213
|
+
$xeTable.handleTargetLeaveEvent(evnt)
|
|
214
|
+
}
|
|
217
215
|
}
|
|
218
216
|
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt)
|
|
219
217
|
}
|
|
@@ -10306,11 +10306,20 @@ export default defineVxeComponent({
|
|
|
10306
10306
|
const rowDragOpts = computeRowDragOpts.value
|
|
10307
10307
|
const { isCrossTableDrag } = rowDragOpts
|
|
10308
10308
|
if (isCrossTableDrag && crossTableDragRowObj && !tableData.length) {
|
|
10309
|
-
const { $oldTable } = crossTableDragRowObj
|
|
10310
|
-
if ($oldTable
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10309
|
+
const { $oldTable, $newTable } = crossTableDragRowObj
|
|
10310
|
+
if ($oldTable) {
|
|
10311
|
+
const oldTableReactData = $oldTable.reactData
|
|
10312
|
+
if ($oldTable.xID !== $xeTable.xID) {
|
|
10313
|
+
if ($newTable && $newTable.xID !== $xeTable.xID) {
|
|
10314
|
+
$newTable.hideCrossTableRowDropClearStatus()
|
|
10315
|
+
}
|
|
10316
|
+
evnt.preventDefault()
|
|
10317
|
+
$oldTable.hideCrossTableRowDropClearStatus()
|
|
10318
|
+
crossTableDragRowObj.$newTable = $xeTable
|
|
10319
|
+
internalData.prevDragRow = null
|
|
10320
|
+
reactData.dragTipText = oldTableReactData.dragTipText
|
|
10321
|
+
showDropTip(evnt, evnt.currentTarget as HTMLDivElement, null, true, '')
|
|
10322
|
+
}
|
|
10314
10323
|
}
|
|
10315
10324
|
}
|
|
10316
10325
|
},
|
|
@@ -10521,6 +10530,9 @@ export default defineVxeComponent({
|
|
|
10521
10530
|
oldTableReactData.isCrossDragRow = false
|
|
10522
10531
|
crossTableDragRowObj.$newTable = null
|
|
10523
10532
|
} else {
|
|
10533
|
+
if ($newTable && $newTable.xID !== $xeTable.xID) {
|
|
10534
|
+
$newTable.hideCrossTableRowDropClearStatus()
|
|
10535
|
+
}
|
|
10524
10536
|
$oldTable.hideCrossTableRowDropClearStatus()
|
|
10525
10537
|
oldTableReactData.isCrossDragRow = true
|
|
10526
10538
|
reactData.dragTipText = oldTableReactData.dragTipText
|
|
@@ -12223,9 +12235,14 @@ export default defineVxeComponent({
|
|
|
12223
12235
|
const scrollbarXToTop = computeScrollbarXToTop.value
|
|
12224
12236
|
const scrollbarYToLeft = computeScrollbarYToLeft.value
|
|
12225
12237
|
const { isCrossTableDrag } = rowDragOpts
|
|
12226
|
-
const
|
|
12238
|
+
const tbOns: {
|
|
12239
|
+
onKeydown: (...args: any[]) => void
|
|
12240
|
+
onDragover?: (...args: any[]) => void
|
|
12241
|
+
} = {
|
|
12242
|
+
onKeydown: keydownEvent
|
|
12243
|
+
}
|
|
12227
12244
|
if (isCrossTableDrag && !tableData.length) {
|
|
12228
|
-
|
|
12245
|
+
tbOns.onDragover = $xeTable.handleCrossTableRowDragoverEmptyEvent
|
|
12229
12246
|
}
|
|
12230
12247
|
return h('div', {
|
|
12231
12248
|
ref: refElem,
|
|
@@ -12261,7 +12278,7 @@ export default defineVxeComponent({
|
|
|
12261
12278
|
'is--virtual-y': scrollYLoad
|
|
12262
12279
|
}],
|
|
12263
12280
|
spellcheck: false,
|
|
12264
|
-
|
|
12281
|
+
...tbOns
|
|
12265
12282
|
}, [
|
|
12266
12283
|
/**
|
|
12267
12284
|
* 隐藏列
|
|
@@ -12288,8 +12305,7 @@ export default defineVxeComponent({
|
|
|
12288
12305
|
]),
|
|
12289
12306
|
h('div', {
|
|
12290
12307
|
key: 'tw',
|
|
12291
|
-
class: 'vxe-table--render-wrapper'
|
|
12292
|
-
...rwOns
|
|
12308
|
+
class: 'vxe-table--render-wrapper'
|
|
12293
12309
|
}, scrollbarXToTop
|
|
12294
12310
|
? [
|
|
12295
12311
|
renderScrollX(),
|
package/packages/ui/src/vn.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
|
|
3
|
+
import type { VxeGlobalRendererHandles } from 'vxe-pc-ui'
|
|
3
4
|
import type { VxeComponentSlotType } from '../../../types'
|
|
4
5
|
|
|
5
6
|
export function getOnName (type: string) {
|
|
6
7
|
return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export function getModelEvent (renderOpts:
|
|
10
|
+
export function getModelEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
|
|
10
11
|
switch (renderOpts.name) {
|
|
11
12
|
case 'input':
|
|
12
13
|
case 'textarea':
|
|
@@ -17,7 +18,7 @@ export function getModelEvent (renderOpts: any) {
|
|
|
17
18
|
return 'update:modelValue'
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export function getChangeEvent (renderOpts:
|
|
21
|
+
export function getChangeEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
|
|
21
22
|
switch (renderOpts.name) {
|
|
22
23
|
case 'input':
|
|
23
24
|
case 'textarea':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|