vxe-table 3.12.0-beta.8 → 3.12.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/locale/lang/de-DE.js +490 -490
- package/es/locale/lang/en-US.js +438 -438
- package/es/locale/lang/it-IT.js +692 -0
- package/es/locale/lang/ru-RU.js +36 -36
- package/es/locale/lang/th-TH.js +692 -0
- package/es/locale/lang/zh-CHT.js +19 -19
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +5 -5
- package/es/table/module/export/mixin.js +208 -140
- package/es/table/module/validator/mixin.js +2 -6
- package/es/table/src/cell.js +88 -61
- package/es/table/src/column.js +2 -2
- package/es/table/src/group.js +2 -2
- package/es/table/src/methods.js +112 -87
- package/es/table/src/table.js +7 -11
- package/es/toolbar/src/toolbar.js +22 -4
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +3 -0
- package/lib/index.umd.js +513 -362
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/de-DE.js +490 -490
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +438 -438
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +438 -438
- package/lib/locale/lang/it-IT.js +698 -0
- package/lib/locale/lang/it-IT.min.js +1 -0
- package/lib/locale/lang/ru-RU.js +36 -36
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +36 -36
- package/lib/locale/lang/th-TH.js +698 -0
- package/lib/locale/lang/th-TH.min.js +1 -0
- package/lib/locale/lang/zh-CHT.js +19 -19
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +19 -19
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +5 -5
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +239 -167
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +1 -6
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/cell.js +109 -83
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +112 -87
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +4 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +36 -2
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +2 -2
- 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/vn.js +3 -0
- package/lib/ui/src/vn.min.js +1 -1
- package/package.json +3 -3
- package/packages/locale/lang/de-DE.ts +492 -491
- package/packages/locale/lang/en-US.ts +438 -438
- package/packages/locale/lang/it-IT.ts +692 -0
- package/packages/locale/lang/ru-RU.ts +36 -36
- package/packages/locale/lang/th-TH.ts +692 -0
- package/packages/locale/lang/zh-CHT.ts +19 -19
- package/packages/table/module/custom/panel.ts +5 -5
- package/packages/table/module/export/mixin.ts +227 -156
- package/packages/table/module/validator/mixin.ts +2 -6
- package/packages/table/src/cell.ts +141 -108
- package/packages/table/src/methods.ts +136 -105
- package/packages/table/src/table.ts +8 -12
- package/packages/toolbar/src/toolbar.ts +26 -8
- package/packages/ui/index.ts +1 -1
- package/packages/ui/src/vn.ts +4 -1
- /package/es/{iconfont.1735299026800.ttf → iconfont.1735661059384.ttf} +0 -0
- /package/es/{iconfont.1735299026800.woff → iconfont.1735661059384.woff} +0 -0
- /package/es/{iconfont.1735299026800.woff2 → iconfont.1735661059384.woff2} +0 -0
- /package/lib/{iconfont.1735299026800.ttf → iconfont.1735661059384.ttf} +0 -0
- /package/lib/{iconfont.1735299026800.woff → iconfont.1735661059384.woff} +0 -0
- /package/lib/{iconfont.1735299026800.woff2 → iconfont.1735661059384.woff2} +0 -0
|
@@ -155,7 +155,7 @@ export default {
|
|
|
155
155
|
*/
|
|
156
156
|
beginValidate (rows: any, cols: VxeTableDefines.ColumnInfo[] | null, cb: any, isFull: any) {
|
|
157
157
|
const validRest: any = {}
|
|
158
|
-
const { editRules, afterFullData,
|
|
158
|
+
const { editRules, afterFullData, treeConfig, treeOpts } = this
|
|
159
159
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
160
160
|
let validList
|
|
161
161
|
if (rows === true) {
|
|
@@ -265,11 +265,7 @@ export default {
|
|
|
265
265
|
} else {
|
|
266
266
|
const row = firstErrParams.row
|
|
267
267
|
const column = firstErrParams.column
|
|
268
|
-
|
|
269
|
-
const columnIndex = visibleColumn.indexOf(column)
|
|
270
|
-
const targetRow = rowIndex > 0 ? afterFullData[rowIndex - 1] : row
|
|
271
|
-
const targetColumn = columnIndex > 0 ? visibleColumn[columnIndex - 1] : column
|
|
272
|
-
this.scrollToRow(targetRow, targetColumn).then(posAndFinish)
|
|
268
|
+
this.scrollToRow(row, column).then(posAndFinish)
|
|
273
269
|
}
|
|
274
270
|
})
|
|
275
271
|
})
|
|
@@ -6,11 +6,11 @@ import { updateCellTitle } from '../../ui/src/dom'
|
|
|
6
6
|
import { createColumn, getRowid } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeTableDefines } from '../../../types'
|
|
9
|
+
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeComponentSlotType, TableReactData, TableInternalData } from '../../../types'
|
|
10
10
|
|
|
11
11
|
const { getI18n, getIcon, renderer, formats, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
13
|
-
function renderTitlePrefixIcon (h: CreateElement, params:
|
|
13
|
+
function renderTitlePrefixIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
14
14
|
const { $table, column } = params
|
|
15
15
|
const titlePrefix = column.titlePrefix || column.titleHelp
|
|
16
16
|
if (titlePrefix) {
|
|
@@ -29,7 +29,7 @@ function renderTitlePrefixIcon (h: CreateElement, params: any) {
|
|
|
29
29
|
return renderEmptyElement($table)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function renderTitleSuffixIcon (h: CreateElement, params:
|
|
32
|
+
function renderTitleSuffixIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
33
33
|
const { $table, column } = params
|
|
34
34
|
const titleSuffix = column.titleSuffix
|
|
35
35
|
if (titleSuffix) {
|
|
@@ -48,7 +48,7 @@ function renderTitleSuffixIcon (h: CreateElement, params: any) {
|
|
|
48
48
|
return renderEmptyElement($table)
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function renderCellDragIcon (h: CreateElement, params:
|
|
51
|
+
function renderCellDragIcon (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
52
52
|
const { $table } = params
|
|
53
53
|
const tableProps = $table
|
|
54
54
|
const { dragConfig } = tableProps
|
|
@@ -78,19 +78,19 @@ function renderCellDragIcon (h: CreateElement, params: any) {
|
|
|
78
78
|
])
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
function renderCellBaseVNs (h: CreateElement, params:
|
|
81
|
+
function renderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, content: VxeComponentSlotType | VxeComponentSlotType[]) {
|
|
82
82
|
const { $table, column, level } = params
|
|
83
83
|
const { dragSort } = column
|
|
84
84
|
const tableProps = $table
|
|
85
85
|
const { treeConfig, dragConfig } = tableProps
|
|
86
86
|
const rowOpts = $table.computeRowOpts
|
|
87
87
|
const rowDragOpts = $table.computeRowDragOpts
|
|
88
|
-
const { showIcon, isCrossDrag, visibleMethod } = rowDragOpts
|
|
88
|
+
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts
|
|
89
89
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
|
|
90
90
|
const vns: any[] = XEUtils.isArray(content) ? content : [content]
|
|
91
91
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
92
92
|
if (treeConfig) {
|
|
93
|
-
if (isCrossDrag || !level) {
|
|
93
|
+
if (isPeerDrag || isCrossDrag || !level) {
|
|
94
94
|
vns.unshift(
|
|
95
95
|
renderCellDragIcon(h, params)
|
|
96
96
|
)
|
|
@@ -104,13 +104,13 @@ function renderCellBaseVNs (h: CreateElement, params: any, content: any) {
|
|
|
104
104
|
return vns
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
function renderHeaderCellDragIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams) {
|
|
107
|
+
function renderHeaderCellDragIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
108
108
|
const { $table, column } = params
|
|
109
109
|
const columnOpts = $table.computeColumnOpts
|
|
110
110
|
const columnDragOpts = $table.computeColumnDragOpts
|
|
111
|
-
const { showIcon, icon, trigger, isCrossDrag, visibleMethod, disabledMethod } = columnDragOpts
|
|
111
|
+
const { showIcon, icon, trigger, isPeerDrag, isCrossDrag, visibleMethod, disabledMethod } = columnDragOpts
|
|
112
112
|
if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
|
|
113
|
-
if (!column.fixed && (isCrossDrag || !column.parentId)) {
|
|
113
|
+
if (!column.fixed && (isPeerDrag || isCrossDrag || !column.parentId)) {
|
|
114
114
|
const isDisabled = disabledMethod && disabledMethod(params)
|
|
115
115
|
const ons: Record<string, any> = {}
|
|
116
116
|
if (trigger !== 'cell') {
|
|
@@ -137,7 +137,7 @@ function renderHeaderCellDragIcon (h: CreateElement, params: VxeTableDefines.Cel
|
|
|
137
137
|
return renderEmptyElement($table)
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
function renderHeaderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams, content: VNode | VNode[]) {
|
|
140
|
+
function renderHeaderCellBaseVNs (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, content: VNode | VNode[]) {
|
|
141
141
|
const vns = [
|
|
142
142
|
renderTitlePrefixIcon(h, params),
|
|
143
143
|
renderHeaderCellDragIcon(h, params),
|
|
@@ -147,18 +147,21 @@ function renderHeaderCellBaseVNs (h: CreateElement, params: VxeTableDefines.Cell
|
|
|
147
147
|
return vns
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
function renderTitleContent (h: CreateElement, params:
|
|
150
|
+
function renderTitleContent (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, content: VxeComponentSlotType | VxeComponentSlotType[]) {
|
|
151
151
|
const { $table, column } = params
|
|
152
152
|
const { type, showHeaderOverflow } = column
|
|
153
|
-
const
|
|
154
|
-
const
|
|
153
|
+
const tableProps = $table
|
|
154
|
+
const tableReactData = $table as unknown as TableReactData
|
|
155
|
+
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps
|
|
156
|
+
const tooltipOpts = $table.computeTooltipOpts
|
|
157
|
+
const showAllTip = tooltipOpts.showAll
|
|
155
158
|
const headOverflow = XEUtils.isUndefined(showHeaderOverflow) || XEUtils.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
|
|
156
159
|
const showTitle = headOverflow === 'title'
|
|
157
160
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip'
|
|
158
|
-
const ons: any = {}
|
|
161
|
+
const ons: Record<string, any> = {}
|
|
159
162
|
if (showTitle || showTooltip || showAllTip) {
|
|
160
|
-
ons.mouseenter = (evnt:
|
|
161
|
-
if (
|
|
163
|
+
ons.mouseenter = (evnt: MouseEvent) => {
|
|
164
|
+
if (tableReactData._isResize) {
|
|
162
165
|
return
|
|
163
166
|
}
|
|
164
167
|
if (showTitle) {
|
|
@@ -170,7 +173,7 @@ function renderTitleContent (h: CreateElement, params: any, content: any) {
|
|
|
170
173
|
}
|
|
171
174
|
if (showTooltip || showAllTip) {
|
|
172
175
|
ons.mouseleave = (evnt: any) => {
|
|
173
|
-
if (
|
|
176
|
+
if (tableReactData._isResize) {
|
|
174
177
|
return
|
|
175
178
|
}
|
|
176
179
|
if (showTooltip || showAllTip) {
|
|
@@ -194,20 +197,26 @@ function renderTitleContent (h: CreateElement, params: any, content: any) {
|
|
|
194
197
|
]
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
function formatFooterLabel (footerFormatter:
|
|
200
|
+
function formatFooterLabel (footerFormatter: VxeColumnPropTypes.FooterFormatter, params: {
|
|
201
|
+
itemValue: any
|
|
202
|
+
column: VxeTableDefines.ColumnInfo
|
|
203
|
+
row: any
|
|
204
|
+
items: any[]
|
|
205
|
+
_columnIndex: number
|
|
206
|
+
}) {
|
|
198
207
|
if (XEUtils.isFunction(footerFormatter)) {
|
|
199
|
-
return footerFormatter(params)
|
|
208
|
+
return `${footerFormatter(params)}`
|
|
200
209
|
}
|
|
201
210
|
const isArr = XEUtils.isArray(footerFormatter)
|
|
202
211
|
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter)
|
|
203
212
|
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
204
213
|
if (footerFormatMethod) {
|
|
205
|
-
return isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)
|
|
214
|
+
return `${isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)}`
|
|
206
215
|
}
|
|
207
216
|
return ''
|
|
208
217
|
}
|
|
209
218
|
|
|
210
|
-
function getFooterContent (h: CreateElement, params:
|
|
219
|
+
function getFooterContent (h: CreateElement, params: VxeTableDefines.CellRenderFooterParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
211
220
|
const { $table, column, _columnIndex, row, items } = params
|
|
212
221
|
const { slots, editRender, cellRender, footerFormatter } = column
|
|
213
222
|
const renderOpts = editRender || cellRender
|
|
@@ -251,7 +260,7 @@ function getFooterContent (h: CreateElement, params: any) {
|
|
|
251
260
|
]
|
|
252
261
|
}
|
|
253
262
|
|
|
254
|
-
function getDefaultCellLabel (params:
|
|
263
|
+
function getDefaultCellLabel (params: VxeTableDefines.CellRenderBodyParams) {
|
|
255
264
|
const { $table, row, column } = params
|
|
256
265
|
return formatText($table.getCellLabel(row, column), 1)
|
|
257
266
|
}
|
|
@@ -309,7 +318,7 @@ export const Cell = {
|
|
|
309
318
|
/**
|
|
310
319
|
* 列头标题
|
|
311
320
|
*/
|
|
312
|
-
renderHeaderTitle (h:
|
|
321
|
+
renderHeaderTitle (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
313
322
|
const { $table, column } = params
|
|
314
323
|
const { slots, editRender, cellRender } = column
|
|
315
324
|
const renderOpts = editRender || cellRender
|
|
@@ -325,10 +334,10 @@ export const Cell = {
|
|
|
325
334
|
}
|
|
326
335
|
return renderTitleContent(h, params, formatText(column.getTitle(), 1))
|
|
327
336
|
},
|
|
328
|
-
renderDefaultHeader (h: CreateElement, params:
|
|
337
|
+
renderDefaultHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
329
338
|
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params))
|
|
330
339
|
},
|
|
331
|
-
renderDefaultCell (h: CreateElement, params:
|
|
340
|
+
renderDefaultCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
332
341
|
const { $table, row, column } = params
|
|
333
342
|
const { slots, editRender, cellRender } = column
|
|
334
343
|
const renderOpts = editRender || cellRender
|
|
@@ -359,10 +368,10 @@ export const Cell = {
|
|
|
359
368
|
])
|
|
360
369
|
])
|
|
361
370
|
},
|
|
362
|
-
renderTreeCell (h: CreateElement, params:
|
|
371
|
+
renderTreeCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
363
372
|
return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params))
|
|
364
373
|
},
|
|
365
|
-
renderDefaultFooter (h: CreateElement, params:
|
|
374
|
+
renderDefaultFooter (h: CreateElement, params: VxeTableDefines.CellRenderFooterParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
366
375
|
return [
|
|
367
376
|
h('span', {
|
|
368
377
|
class: 'vxe-cell--item'
|
|
@@ -373,9 +382,13 @@ export const Cell = {
|
|
|
373
382
|
/**
|
|
374
383
|
* 树节点
|
|
375
384
|
*/
|
|
376
|
-
renderTreeIcon (h: CreateElement, params:
|
|
385
|
+
renderTreeIcon (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, cellVNodes: VxeComponentSlotType[]) {
|
|
377
386
|
const { $table, isHidden } = params
|
|
378
|
-
const
|
|
387
|
+
const tableReactData = $table as unknown as TableReactData
|
|
388
|
+
const tableInternalData = $table as unknown as TableInternalData
|
|
389
|
+
const { treeExpandedMaps, treeExpandLazyLoadedMaps } = tableReactData
|
|
390
|
+
const { fullAllDataRowIdData } = tableInternalData
|
|
391
|
+
const treeOpts = $table.computeTreeOpts
|
|
379
392
|
const { row, column, level } = params
|
|
380
393
|
const { slots } = column
|
|
381
394
|
const { indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts
|
|
@@ -383,17 +396,18 @@ export const Cell = {
|
|
|
383
396
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
|
|
384
397
|
const rowChilds = row[childrenField]
|
|
385
398
|
const hasChild = rowChilds && rowChilds.length
|
|
399
|
+
const iconSlot = slots ? slots.icon : null
|
|
386
400
|
let hasLazyChilds = false
|
|
387
|
-
let
|
|
401
|
+
let isActive = false
|
|
388
402
|
let isLazyLoading = false
|
|
389
403
|
let isLazyLoaded = false
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
return $table.callSlot(
|
|
404
|
+
const ons: Record<string, any> = {}
|
|
405
|
+
if (iconSlot) {
|
|
406
|
+
return $table.callSlot(iconSlot, params, h)
|
|
393
407
|
}
|
|
394
408
|
if (!isHidden) {
|
|
395
409
|
const rowid = getRowid($table, row)
|
|
396
|
-
|
|
410
|
+
isActive = !!treeExpandedMaps[rowid]
|
|
397
411
|
if (lazy) {
|
|
398
412
|
const rest = fullAllDataRowIdData[rowid]
|
|
399
413
|
isLazyLoading = !!treeExpandLazyLoadedMaps[rowid]
|
|
@@ -402,14 +416,14 @@ export const Cell = {
|
|
|
402
416
|
}
|
|
403
417
|
}
|
|
404
418
|
if (!trigger || trigger === 'default') {
|
|
405
|
-
|
|
419
|
+
ons.click = (evnt: MouseEvent) => {
|
|
406
420
|
$table.triggerTreeExpandEvent(evnt, params)
|
|
407
421
|
}
|
|
408
422
|
}
|
|
409
423
|
return [
|
|
410
424
|
h('div', {
|
|
411
425
|
class: ['vxe-cell--tree-node', {
|
|
412
|
-
'is--active':
|
|
426
|
+
'is--active': isActive
|
|
413
427
|
}],
|
|
414
428
|
style: {
|
|
415
429
|
paddingLeft: `${level * indent}px`
|
|
@@ -419,10 +433,10 @@ export const Cell = {
|
|
|
419
433
|
? [
|
|
420
434
|
h('div', {
|
|
421
435
|
class: 'vxe-tree--btn-wrapper',
|
|
422
|
-
on
|
|
436
|
+
on: ons
|
|
423
437
|
}, [
|
|
424
438
|
h('i', {
|
|
425
|
-
class: ['vxe-tree--node-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_TREE_LOADED) : (
|
|
439
|
+
class: ['vxe-tree--node-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_TREE_LOADED) : (isActive ? (iconOpen || getIcon().TABLE_TREE_OPEN) : (iconClose || getIcon().TABLE_TREE_CLOSE))]
|
|
426
440
|
})
|
|
427
441
|
])
|
|
428
442
|
]
|
|
@@ -437,14 +451,16 @@ export const Cell = {
|
|
|
437
451
|
/**
|
|
438
452
|
* 序号
|
|
439
453
|
*/
|
|
440
|
-
renderSeqHeader (h: CreateElement, params:
|
|
454
|
+
renderSeqHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
441
455
|
const { $table, column } = params
|
|
442
456
|
const { slots } = column
|
|
443
457
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : formatText(column.getTitle(), 1)))
|
|
444
458
|
},
|
|
445
|
-
renderSeqCell (h: CreateElement, params:
|
|
459
|
+
renderSeqCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
446
460
|
const { $table, column } = params
|
|
447
|
-
const
|
|
461
|
+
const tableProps = $table
|
|
462
|
+
const { treeConfig } = tableProps
|
|
463
|
+
const seqOpts = $table.computeSeqOpts
|
|
448
464
|
const { slots } = column
|
|
449
465
|
if (slots && slots.default) {
|
|
450
466
|
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h))
|
|
@@ -452,17 +468,17 @@ export const Cell = {
|
|
|
452
468
|
const { seq } = params
|
|
453
469
|
const seqMethod = seqOpts.seqMethod
|
|
454
470
|
return renderCellBaseVNs(h, params, [
|
|
455
|
-
h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
471
|
+
h('span', `${formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + (seq as number), 1)}`)
|
|
456
472
|
])
|
|
457
473
|
},
|
|
458
|
-
renderTreeIndexCell (h: CreateElement, params:
|
|
474
|
+
renderTreeIndexCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
459
475
|
return Cell.renderTreeIcon(h, params, Cell.renderSeqCell(h, params))
|
|
460
476
|
},
|
|
461
477
|
|
|
462
478
|
/**
|
|
463
479
|
* 单选
|
|
464
480
|
*/
|
|
465
|
-
renderRadioHeader (h: CreateElement, params:
|
|
481
|
+
renderRadioHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
466
482
|
const { $table, column } = params
|
|
467
483
|
const { slots } = column
|
|
468
484
|
const headerSlot = slots ? slots.header : null
|
|
@@ -477,9 +493,11 @@ export const Cell = {
|
|
|
477
493
|
])
|
|
478
494
|
)
|
|
479
495
|
},
|
|
480
|
-
renderRadioCell (h: CreateElement, params:
|
|
496
|
+
renderRadioCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
481
497
|
const { $table, column, isHidden } = params
|
|
482
|
-
const
|
|
498
|
+
const tableReactData = $table as unknown as TableReactData
|
|
499
|
+
const { selectRadioRow } = tableReactData
|
|
500
|
+
const radioOpts = $table.computeRadioOpts
|
|
483
501
|
const { slots } = column
|
|
484
502
|
const { labelField, checkMethod, visibleMethod } = radioOpts
|
|
485
503
|
const { row } = params
|
|
@@ -530,28 +548,28 @@ export const Cell = {
|
|
|
530
548
|
}, radioVNs)
|
|
531
549
|
])
|
|
532
550
|
},
|
|
533
|
-
renderTreeRadioCell (h: CreateElement, params:
|
|
551
|
+
renderTreeRadioCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
534
552
|
return Cell.renderTreeIcon(h, params, Cell.renderRadioCell(h, params))
|
|
535
553
|
},
|
|
536
554
|
|
|
537
555
|
/**
|
|
538
556
|
* 多选
|
|
539
557
|
*/
|
|
540
|
-
renderCheckboxHeader (h: CreateElement, params:
|
|
558
|
+
renderCheckboxHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
541
559
|
const { $table, column, isHidden } = params
|
|
542
|
-
const
|
|
560
|
+
const tableReactData = $table as unknown as TableReactData
|
|
561
|
+
const { isAllSelected: isAllCheckboxSelected, isIndeterminate: isAllCheckboxIndeterminate } = tableReactData
|
|
562
|
+
const isAllCheckboxDisabled = $table.computeIsAllCheckboxDisabled
|
|
543
563
|
const { slots } = column
|
|
544
564
|
const headerSlot = slots ? slots.header : null
|
|
545
565
|
const titleSlot = slots ? slots.title : null
|
|
546
|
-
const checkboxOpts = $table.
|
|
566
|
+
const checkboxOpts = $table.computeCheckboxOpts
|
|
547
567
|
const headerTitle = column.getTitle()
|
|
548
|
-
|
|
568
|
+
const ons: Record<string, any> = {}
|
|
549
569
|
if (!isHidden) {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected)
|
|
554
|
-
}
|
|
570
|
+
ons.click = (evnt: any) => {
|
|
571
|
+
if (!isAllCheckboxDisabled) {
|
|
572
|
+
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected)
|
|
555
573
|
}
|
|
556
574
|
}
|
|
557
575
|
}
|
|
@@ -577,7 +595,7 @@ export const Cell = {
|
|
|
577
595
|
attrs: {
|
|
578
596
|
title: getI18n('vxe.table.allTitle')
|
|
579
597
|
},
|
|
580
|
-
on
|
|
598
|
+
on: ons
|
|
581
599
|
}, [
|
|
582
600
|
h('span', {
|
|
583
601
|
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
@@ -592,10 +610,14 @@ export const Cell = {
|
|
|
592
610
|
])
|
|
593
611
|
)
|
|
594
612
|
},
|
|
595
|
-
renderCheckboxCell (h: CreateElement, params:
|
|
613
|
+
renderCheckboxCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
596
614
|
const { $table, row, column, isHidden } = params
|
|
597
|
-
const
|
|
598
|
-
const
|
|
615
|
+
const tableProps = $table
|
|
616
|
+
const tableReactData = $table as unknown as TableReactData
|
|
617
|
+
const { treeConfig } = tableProps
|
|
618
|
+
const { selectCheckboxMaps, treeIndeterminateMaps } = tableReactData
|
|
619
|
+
const checkboxOpts = $table.computeCheckboxOpts
|
|
620
|
+
const { labelField, checkMethod, visibleMethod } = checkboxOpts
|
|
599
621
|
const { slots } = column
|
|
600
622
|
const defaultSlot = slots ? slots.default : null
|
|
601
623
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
@@ -603,15 +625,13 @@ export const Cell = {
|
|
|
603
625
|
let isChecked = false
|
|
604
626
|
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
605
627
|
let isDisabled = !!checkMethod
|
|
606
|
-
|
|
628
|
+
const ons: Record<string, any> = {}
|
|
607
629
|
if (!isHidden) {
|
|
608
630
|
const rowid = getRowid($table, row)
|
|
609
631
|
isChecked = !!selectCheckboxMaps[rowid]
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
614
|
-
}
|
|
632
|
+
ons.click = (evnt: any) => {
|
|
633
|
+
if (!isDisabled && isVisible) {
|
|
634
|
+
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
615
635
|
}
|
|
616
636
|
}
|
|
617
637
|
if (checkMethod) {
|
|
@@ -648,16 +668,20 @@ export const Cell = {
|
|
|
648
668
|
'is--indeterminate': indeterminate,
|
|
649
669
|
'is--hidden': !isVisible
|
|
650
670
|
}],
|
|
651
|
-
on
|
|
671
|
+
on: ons
|
|
652
672
|
}, checkVNs)
|
|
653
673
|
])
|
|
654
674
|
},
|
|
655
|
-
renderTreeSelectionCell (h: CreateElement, params:
|
|
675
|
+
renderTreeSelectionCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
656
676
|
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCell(h, params))
|
|
657
677
|
},
|
|
658
|
-
renderCheckboxCellByProp (h: CreateElement, params:
|
|
678
|
+
renderCheckboxCellByProp (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
659
679
|
const { $table, row, column, isHidden } = params
|
|
660
|
-
const
|
|
680
|
+
const tableProps = $table
|
|
681
|
+
const tableReactData = $table as unknown as TableReactData
|
|
682
|
+
const { treeConfig } = tableProps
|
|
683
|
+
const { treeIndeterminateMaps } = tableReactData
|
|
684
|
+
const checkboxOpts = $table.computeCheckboxOpts
|
|
661
685
|
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts
|
|
662
686
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField
|
|
663
687
|
const { slots } = column
|
|
@@ -667,15 +691,13 @@ export const Cell = {
|
|
|
667
691
|
let isChecked = false
|
|
668
692
|
const isVisible = !visibleMethod || visibleMethod({ row })
|
|
669
693
|
let isDisabled = !!checkMethod
|
|
670
|
-
|
|
694
|
+
const ons: Record<string, any> = {}
|
|
671
695
|
if (!isHidden) {
|
|
672
696
|
const rowid = getRowid($table, row)
|
|
673
697
|
isChecked = XEUtils.get(row, checkField)
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
678
|
-
}
|
|
698
|
+
ons.click = (evnt: any) => {
|
|
699
|
+
if (!isDisabled && isVisible) {
|
|
700
|
+
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
679
701
|
}
|
|
680
702
|
}
|
|
681
703
|
if (checkMethod) {
|
|
@@ -712,31 +734,34 @@ export const Cell = {
|
|
|
712
734
|
'is--indeterminate': indeterminateField && !isChecked ? row[indeterminateField] : isIndeterminate,
|
|
713
735
|
'is--hidden': !isVisible
|
|
714
736
|
}],
|
|
715
|
-
on
|
|
737
|
+
on: ons
|
|
716
738
|
}, checkVNs)
|
|
717
739
|
])
|
|
718
740
|
},
|
|
719
|
-
renderTreeSelectionCellByProp (h: CreateElement, params:
|
|
741
|
+
renderTreeSelectionCellByProp (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
720
742
|
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCellByProp(h, params))
|
|
721
743
|
},
|
|
722
744
|
|
|
723
745
|
/**
|
|
724
746
|
* 展开行
|
|
725
747
|
*/
|
|
726
|
-
renderExpandCell (h: CreateElement, params:
|
|
748
|
+
renderExpandCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
727
749
|
const { $table, isHidden, row, column } = params
|
|
728
|
-
const
|
|
750
|
+
const tableReactData = $table as unknown as TableReactData
|
|
751
|
+
const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableReactData
|
|
752
|
+
const expandOpts = $table.computeExpandOpts
|
|
729
753
|
const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts
|
|
730
754
|
const { slots } = column
|
|
731
755
|
const defaultSlot = slots ? slots.default : null
|
|
732
|
-
|
|
756
|
+
const iconSlot = slots ? slots.icon : null
|
|
757
|
+
let isActive = false
|
|
733
758
|
let isLazyLoading = false
|
|
734
|
-
if (
|
|
735
|
-
return renderCellBaseVNs(h, params, $table.callSlot(
|
|
759
|
+
if (iconSlot) {
|
|
760
|
+
return renderCellBaseVNs(h, params, $table.callSlot(iconSlot, params, h))
|
|
736
761
|
}
|
|
737
762
|
if (!isHidden) {
|
|
738
763
|
const rowid = getRowid($table, row)
|
|
739
|
-
|
|
764
|
+
isActive = !!rowExpandedMaps[rowid]
|
|
740
765
|
if (lazy) {
|
|
741
766
|
isLazyLoading = !!rowExpandLazyLoadedMaps[rowid]
|
|
742
767
|
}
|
|
@@ -745,7 +770,7 @@ export const Cell = {
|
|
|
745
770
|
showIcon && (!visibleMethod || visibleMethod(params))
|
|
746
771
|
? h('span', {
|
|
747
772
|
class: ['vxe-table--expanded', {
|
|
748
|
-
'is--active':
|
|
773
|
+
'is--active': isActive
|
|
749
774
|
}],
|
|
750
775
|
on: {
|
|
751
776
|
click (evnt: any) {
|
|
@@ -754,7 +779,7 @@ export const Cell = {
|
|
|
754
779
|
}
|
|
755
780
|
}, [
|
|
756
781
|
h('i', {
|
|
757
|
-
class: ['vxe-table--expand-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_EXPAND_LOADED) : (
|
|
782
|
+
class: ['vxe-table--expand-btn', isLazyLoading ? (iconLoaded || getIcon().TABLE_EXPAND_LOADED) : (isActive ? (iconOpen || getIcon().TABLE_EXPAND_OPEN) : (iconClose || getIcon().TABLE_EXPAND_CLOSE))]
|
|
758
783
|
})
|
|
759
784
|
])
|
|
760
785
|
: renderEmptyElement($table),
|
|
@@ -765,7 +790,7 @@ export const Cell = {
|
|
|
765
790
|
: renderEmptyElement($table)
|
|
766
791
|
])
|
|
767
792
|
},
|
|
768
|
-
renderExpandData (h: CreateElement, params:
|
|
793
|
+
renderExpandData (h: CreateElement, params: VxeTableDefines.CellRenderDataParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
769
794
|
const { $table, column } = params
|
|
770
795
|
const { slots, contentRender } = column
|
|
771
796
|
if (slots && slots.content) {
|
|
@@ -784,7 +809,7 @@ export const Cell = {
|
|
|
784
809
|
/**
|
|
785
810
|
* HTML 标签
|
|
786
811
|
*/
|
|
787
|
-
renderHTMLCell (h: CreateElement, params:
|
|
812
|
+
renderHTMLCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
788
813
|
const { $table, column } = params
|
|
789
814
|
const { slots } = column
|
|
790
815
|
if (slots && slots.default) {
|
|
@@ -799,14 +824,14 @@ export const Cell = {
|
|
|
799
824
|
})
|
|
800
825
|
])
|
|
801
826
|
},
|
|
802
|
-
renderTreeHTMLCell (h: CreateElement, params:
|
|
827
|
+
renderTreeHTMLCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
803
828
|
return Cell.renderTreeIcon(h, params, Cell.renderHTMLCell(h, params))
|
|
804
829
|
},
|
|
805
830
|
|
|
806
831
|
/**
|
|
807
832
|
* 排序和筛选
|
|
808
833
|
*/
|
|
809
|
-
renderSortAndFilterHeader (h: CreateElement, params:
|
|
834
|
+
renderSortAndFilterHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
810
835
|
return renderHeaderCellBaseVNs(
|
|
811
836
|
h,
|
|
812
837
|
params,
|
|
@@ -817,14 +842,14 @@ export const Cell = {
|
|
|
817
842
|
/**
|
|
818
843
|
* 排序
|
|
819
844
|
*/
|
|
820
|
-
renderSortHeader (h: CreateElement, params:
|
|
845
|
+
renderSortHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
821
846
|
return renderHeaderCellBaseVNs(
|
|
822
847
|
h,
|
|
823
848
|
params,
|
|
824
849
|
Cell.renderHeaderTitle(h, params).concat(Cell.renderSortIcon(h, params))
|
|
825
850
|
)
|
|
826
851
|
},
|
|
827
|
-
renderSortIcon (h: CreateElement, params:
|
|
852
|
+
renderSortIcon (h: CreateElement, params: (VxeTableDefines.CellRenderHeaderParams | VxeTableDefines.CellRenderHeaderParams) & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
828
853
|
const { $table, column } = params
|
|
829
854
|
const { showIcon, iconLayout, iconAsc, iconDesc } = $table.sortOpts
|
|
830
855
|
return showIcon
|
|
@@ -868,12 +893,14 @@ export const Cell = {
|
|
|
868
893
|
/**
|
|
869
894
|
* 筛选
|
|
870
895
|
*/
|
|
871
|
-
renderFilterHeader (h: CreateElement, params:
|
|
896
|
+
renderFilterHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
872
897
|
return renderHeaderCellBaseVNs(h, params, Cell.renderHeaderTitle(h, params).concat(Cell.renderFilterIcon(h, params)))
|
|
873
898
|
},
|
|
874
|
-
renderFilterIcon (h: CreateElement, params:
|
|
899
|
+
renderFilterIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
875
900
|
const { $table, column, hasFilter } = params
|
|
876
|
-
const
|
|
901
|
+
const tableReactData = $table as unknown as TableReactData
|
|
902
|
+
const { filterStore } = tableReactData
|
|
903
|
+
const filterOpts = $table.computeFilterOpts
|
|
877
904
|
const { showIcon, iconNone, iconMatch } = filterOpts
|
|
878
905
|
return showIcon
|
|
879
906
|
? [
|
|
@@ -888,7 +915,7 @@ export const Cell = {
|
|
|
888
915
|
title: getI18n('vxe.table.filter')
|
|
889
916
|
},
|
|
890
917
|
on: {
|
|
891
|
-
click (evnt:
|
|
918
|
+
click (evnt: MouseEvent) {
|
|
892
919
|
if ($table.triggerFilterEvent) {
|
|
893
920
|
$table.triggerFilterEvent(evnt, params.column, params)
|
|
894
921
|
}
|
|
@@ -903,10 +930,12 @@ export const Cell = {
|
|
|
903
930
|
/**
|
|
904
931
|
* 可编辑
|
|
905
932
|
*/
|
|
906
|
-
renderEditHeader (h: CreateElement, params:
|
|
933
|
+
renderEditHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
907
934
|
const { $table, column } = params
|
|
908
|
-
const
|
|
909
|
-
const {
|
|
935
|
+
const tableProps = $table
|
|
936
|
+
const { editConfig, editRules } = tableProps
|
|
937
|
+
const editOpts = $table.computeEditOpts
|
|
938
|
+
const { sortable, filters, editRender } = column
|
|
910
939
|
let isRequired = false
|
|
911
940
|
if (editRules) {
|
|
912
941
|
const columnRules = XEUtils.get(editRules, column.field)
|
|
@@ -931,31 +960,35 @@ export const Cell = {
|
|
|
931
960
|
}
|
|
932
961
|
return renderHeaderCellBaseVNs(h, params,
|
|
933
962
|
editIconVNs.concat(Cell.renderHeaderTitle(h, params))
|
|
934
|
-
.concat(sortable
|
|
963
|
+
.concat(sortable ? Cell.renderSortIcon(h, params) : [])
|
|
935
964
|
.concat(filters ? Cell.renderFilterIcon(h, params) : [])
|
|
936
965
|
)
|
|
937
966
|
},
|
|
938
967
|
// 行格编辑模式
|
|
939
|
-
renderRowEdit (h: CreateElement, params:
|
|
968
|
+
renderRowEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
940
969
|
const { $table, column } = params
|
|
970
|
+
const tableReactData = $table as unknown as TableReactData
|
|
971
|
+
const { editStore } = tableReactData
|
|
972
|
+
const { actived } = editStore
|
|
941
973
|
const { editRender } = column
|
|
942
|
-
const { actived } = $table.editStore
|
|
943
974
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row)
|
|
944
975
|
},
|
|
945
|
-
renderTreeRowEdit (h: CreateElement, params:
|
|
976
|
+
renderTreeRowEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
946
977
|
return Cell.renderTreeIcon(h, params, Cell.renderRowEdit(h, params))
|
|
947
978
|
},
|
|
948
979
|
// 单元格编辑模式
|
|
949
|
-
renderCellEdit (h: CreateElement, params:
|
|
980
|
+
renderCellEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
950
981
|
const { $table, column } = params
|
|
982
|
+
const tableReactData = $table as unknown as TableReactData
|
|
983
|
+
const { editStore } = tableReactData
|
|
984
|
+
const { actived } = editStore
|
|
951
985
|
const { editRender } = column
|
|
952
|
-
const { actived } = $table.editStore
|
|
953
986
|
return Cell.runRenderer(h, params, this, isEnableConf(editRender) && actived && actived.row === params.row && actived.column === params.column)
|
|
954
987
|
},
|
|
955
|
-
renderTreeCellEdit (h: CreateElement, params:
|
|
988
|
+
renderTreeCellEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
956
989
|
return Cell.renderTreeIcon(h, params, Cell.renderCellEdit(h, params))
|
|
957
990
|
},
|
|
958
|
-
runRenderer (h: CreateElement, params:
|
|
991
|
+
runRenderer (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, _vm: any, isEdit: boolean) {
|
|
959
992
|
const { $table, column } = params
|
|
960
993
|
const { slots, editRender, formatter } = column
|
|
961
994
|
const compConf = renderer.get(editRender.name)
|