vxe-table 4.8.16 → 4.9.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/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/locale/lang/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +4 -0
- package/es/table/module/edit/hook.js +53 -34
- package/es/table/module/filter/hook.js +2 -3
- package/es/table/module/keyboard/hook.js +2 -2
- package/es/table/src/body.js +31 -24
- package/es/table/src/cell.js +99 -59
- package/es/table/src/emits.js +3 -0
- package/es/table/src/footer.js +177 -147
- package/es/table/src/header.js +144 -107
- package/es/table/src/props.js +5 -1
- package/es/table/src/table.js +346 -108
- package/es/table/src/util.js +9 -0
- package/es/table/style.css +33 -20
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +9 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -20
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +1035 -573
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +4 -0
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/edit/hook.js +63 -42
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -2
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/body.js +34 -21
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +110 -51
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/footer.js +222 -183
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +188 -150
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +5 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +380 -110
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +10 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +33 -20
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +9 -4
- 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 +33 -20
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/hook.ts +4 -0
- package/packages/table/module/edit/hook.ts +54 -34
- package/packages/table/module/filter/hook.ts +2 -3
- package/packages/table/module/keyboard/hook.ts +2 -2
- package/packages/table/src/body.ts +46 -31
- package/packages/table/src/cell.ts +140 -92
- package/packages/table/src/emits.ts +3 -0
- package/packages/table/src/footer.ts +189 -152
- package/packages/table/src/header.ts +157 -116
- package/packages/table/src/props.ts +5 -1
- package/packages/table/src/table.ts +358 -109
- package/packages/table/src/util.ts +10 -0
- package/packages/ui/index.ts +8 -3
- package/styles/components/table.scss +42 -35
- /package/es/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
- /package/es/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
- /package/es/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
- /package/lib/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
- /package/lib/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
- /package/lib/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
|
@@ -13,45 +13,46 @@ const { getI18n, getIcon, renderer, formats, renderEmptyElement } = VxeUI
|
|
|
13
13
|
function renderTitlePrefixIcon (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
14
14
|
const { $table, column } = params
|
|
15
15
|
const titlePrefix = column.titlePrefix || column.titleHelp
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
: []
|
|
16
|
+
if (titlePrefix) {
|
|
17
|
+
return h('i', {
|
|
18
|
+
class: ['vxe-cell-title-prefix-icon', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
|
|
19
|
+
onMouseenter (evnt: MouseEvent) {
|
|
20
|
+
$table.triggerHeaderTitleEvent(evnt, titlePrefix, params)
|
|
21
|
+
},
|
|
22
|
+
onMouseleave (evnt: MouseEvent) {
|
|
23
|
+
$table.handleTargetLeaveEvent(evnt)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
return renderEmptyElement($table)
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
function renderTitleSuffixIcon (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
32
31
|
const { $table, column } = params
|
|
33
32
|
const titleSuffix = column.titleSuffix
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
: []
|
|
33
|
+
if (titleSuffix) {
|
|
34
|
+
h('i', {
|
|
35
|
+
class: ['vxe-cell-title-suffix-icon', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
|
|
36
|
+
onMouseenter (evnt: MouseEvent) {
|
|
37
|
+
$table.triggerHeaderTitleEvent(evnt, titleSuffix, params)
|
|
38
|
+
},
|
|
39
|
+
onMouseleave (evnt: MouseEvent) {
|
|
40
|
+
$table.handleTargetLeaveEvent(evnt)
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
return renderEmptyElement($table)
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
function renderCellDragIcon (params: VxeTableDefines.CellRenderBodyParams) {
|
|
50
48
|
const { $table } = params
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const {
|
|
54
|
-
const
|
|
49
|
+
const tableProps = $table.props
|
|
50
|
+
const { dragConfig } = tableProps
|
|
51
|
+
const { computeRowDragOpts } = $table.getComputeMaps()
|
|
52
|
+
const rowDragOpts = computeRowDragOpts.value
|
|
53
|
+
const { icon, disabledMethod } = rowDragOpts
|
|
54
|
+
const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null)
|
|
55
|
+
const isDisabled = rDisabledMethod && rDisabledMethod(params)
|
|
55
56
|
return h('span', {
|
|
56
57
|
key: 'dg',
|
|
57
58
|
class: ['vxe-cell--drag-handle', {
|
|
@@ -65,7 +66,7 @@ function renderCellDragIcon (params: VxeTableDefines.CellRenderBodyParams) {
|
|
|
65
66
|
onMouseup: $table.handleCellDragMouseupEvent
|
|
66
67
|
}, [
|
|
67
68
|
h('i', {
|
|
68
|
-
class: rowIcon || getIcon().TABLE_DRAG_ROW
|
|
69
|
+
class: icon || (dragConfig ? dragConfig.rowIcon : '') || getIcon().TABLE_DRAG_ROW
|
|
69
70
|
})
|
|
70
71
|
])
|
|
71
72
|
}
|
|
@@ -74,13 +75,14 @@ function renderCellBaseVNs (params: VxeTableDefines.CellRenderBodyParams, conten
|
|
|
74
75
|
const { $table, column, level } = params
|
|
75
76
|
const { dragSort } = column
|
|
76
77
|
const tableProps = $table.props
|
|
77
|
-
const { treeConfig } = tableProps
|
|
78
|
-
const { computeRowOpts,
|
|
78
|
+
const { treeConfig, dragConfig } = tableProps
|
|
79
|
+
const { computeRowOpts, computeRowDragOpts } = $table.getComputeMaps()
|
|
79
80
|
const rowOpts = computeRowOpts.value
|
|
80
|
-
const
|
|
81
|
-
const {
|
|
81
|
+
const rowDragOpts = computeRowDragOpts.value
|
|
82
|
+
const { showIcon, visibleMethod } = rowDragOpts
|
|
83
|
+
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null)
|
|
82
84
|
const vns: VxeComponentSlotType[] = XEUtils.isArray(content) ? content : [content]
|
|
83
|
-
if (dragSort && rowOpts.drag && (showRowIcon && (!
|
|
85
|
+
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
84
86
|
if (!treeConfig || !level) {
|
|
85
87
|
vns.unshift(
|
|
86
88
|
renderCellDragIcon(params)
|
|
@@ -90,6 +92,46 @@ function renderCellBaseVNs (params: VxeTableDefines.CellRenderBodyParams, conten
|
|
|
90
92
|
return vns
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
function renderHeaderCellDragIcon (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
96
|
+
const { $table, column } = params
|
|
97
|
+
const { computeColumnOpts, computeColumnDragOpts } = $table.getComputeMaps()
|
|
98
|
+
const columnOpts = computeColumnOpts.value
|
|
99
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
100
|
+
const { showIcon, icon, visibleMethod, disabledMethod } = columnDragOpts
|
|
101
|
+
const isDisabled = disabledMethod && disabledMethod(params)
|
|
102
|
+
if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
|
|
103
|
+
if (!(column.fixed || column.parentId)) {
|
|
104
|
+
return h('span', {
|
|
105
|
+
key: 'dg',
|
|
106
|
+
class: ['vxe-cell--drag-handle', {
|
|
107
|
+
'is--disabled': isDisabled
|
|
108
|
+
}],
|
|
109
|
+
onMousedown (evnt) {
|
|
110
|
+
if (!isDisabled) {
|
|
111
|
+
$table.handleHeaderCellDragMousedownEvent(evnt, params)
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
onMouseup: $table.handleHeaderCellDragMouseupEvent
|
|
115
|
+
}, [
|
|
116
|
+
h('i', {
|
|
117
|
+
class: icon || getIcon().TABLE_DRAG_COLUMN
|
|
118
|
+
})
|
|
119
|
+
])
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return renderEmptyElement($table)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function renderHeaderCellBaseVNs (params: VxeTableDefines.CellRenderHeaderParams, content: VNode | VNode[]) {
|
|
126
|
+
const vns = [
|
|
127
|
+
renderTitlePrefixIcon(params),
|
|
128
|
+
renderHeaderCellDragIcon(params),
|
|
129
|
+
...(XEUtils.isArray(content) ? content : [content]),
|
|
130
|
+
renderTitleSuffixIcon(params)
|
|
131
|
+
]
|
|
132
|
+
return vns
|
|
133
|
+
}
|
|
134
|
+
|
|
93
135
|
function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams, content: VxeComponentSlotType | VxeComponentSlotType[]) {
|
|
94
136
|
const { $table, column } = params
|
|
95
137
|
const { props, reactData } = $table
|
|
@@ -264,7 +306,7 @@ export const Cell = {
|
|
|
264
306
|
return createColumn($xeTable, columnOpts, renConfs)
|
|
265
307
|
},
|
|
266
308
|
/**
|
|
267
|
-
*
|
|
309
|
+
* 列头标题
|
|
268
310
|
*/
|
|
269
311
|
renderHeaderTitle (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
270
312
|
const { $table, column } = params
|
|
@@ -286,7 +328,7 @@ export const Cell = {
|
|
|
286
328
|
return renderTitleContent(params, formatText(column.getTitle(), 1))
|
|
287
329
|
},
|
|
288
330
|
renderDefaultHeader (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
289
|
-
return
|
|
331
|
+
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params))
|
|
290
332
|
},
|
|
291
333
|
renderDefaultCell (params: VxeTableDefines.CellRenderBodyParams) {
|
|
292
334
|
const { $table, row, column } = params
|
|
@@ -404,13 +446,13 @@ export const Cell = {
|
|
|
404
446
|
},
|
|
405
447
|
|
|
406
448
|
/**
|
|
407
|
-
*
|
|
449
|
+
* 序号
|
|
408
450
|
*/
|
|
409
451
|
renderSeqHeader (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
410
452
|
const { $table, column } = params
|
|
411
453
|
const { slots } = column
|
|
412
454
|
const headerSlot = slots ? slots.header : null
|
|
413
|
-
return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1))
|
|
455
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1)))
|
|
414
456
|
},
|
|
415
457
|
renderSeqCell (params: VxeTableDefines.CellRenderBodyParams) {
|
|
416
458
|
const { $table, column } = params
|
|
@@ -441,13 +483,15 @@ export const Cell = {
|
|
|
441
483
|
const { slots } = column
|
|
442
484
|
const headerSlot = slots ? slots.header : null
|
|
443
485
|
const titleSlot = slots ? slots.title : null
|
|
444
|
-
return
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
486
|
+
return renderHeaderCellBaseVNs(params,
|
|
487
|
+
renderTitleContent(params, headerSlot
|
|
488
|
+
? $table.callSlot(headerSlot, params)
|
|
489
|
+
: [
|
|
490
|
+
h('span', {
|
|
491
|
+
class: 'vxe-radio--label'
|
|
492
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : formatText(column.getTitle(), 1))
|
|
493
|
+
])
|
|
494
|
+
)
|
|
451
495
|
},
|
|
452
496
|
renderRadioCell (params: VxeTableDefines.CellRenderBodyParams) {
|
|
453
497
|
const { $table, column, isHidden } = params
|
|
@@ -535,36 +579,38 @@ export const Cell = {
|
|
|
535
579
|
}
|
|
536
580
|
const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
|
|
537
581
|
if (headerSlot) {
|
|
538
|
-
return renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams))
|
|
582
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)))
|
|
539
583
|
}
|
|
540
584
|
if (checkboxOpts.checkStrictly ? !checkboxOpts.showHeader : checkboxOpts.showHeader === false) {
|
|
541
|
-
return renderTitleContent(checkboxParams, [
|
|
585
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
542
586
|
h('span', {
|
|
543
587
|
class: 'vxe-checkbox--label'
|
|
544
588
|
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
|
|
545
|
-
])
|
|
589
|
+
]))
|
|
546
590
|
}
|
|
547
|
-
return
|
|
548
|
-
|
|
549
|
-
class: ['vxe-cell--checkbox', {
|
|
550
|
-
'is--checked': isAllCheckboxSelected,
|
|
551
|
-
'is--disabled': isAllCheckboxDisabled,
|
|
552
|
-
'is--indeterminate': isAllCheckboxIndeterminate
|
|
553
|
-
}],
|
|
554
|
-
title: getI18n('vxe.table.allTitle'),
|
|
555
|
-
...ons
|
|
556
|
-
}, [
|
|
591
|
+
return renderHeaderCellBaseVNs(params,
|
|
592
|
+
renderTitleContent(checkboxParams, [
|
|
557
593
|
h('span', {
|
|
558
|
-
class: ['vxe-checkbox
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
594
|
+
class: ['vxe-cell--checkbox', {
|
|
595
|
+
'is--checked': isAllCheckboxSelected,
|
|
596
|
+
'is--disabled': isAllCheckboxDisabled,
|
|
597
|
+
'is--indeterminate': isAllCheckboxIndeterminate
|
|
598
|
+
}],
|
|
599
|
+
title: getI18n('vxe.table.allTitle'),
|
|
600
|
+
...ons
|
|
601
|
+
}, [
|
|
602
|
+
h('span', {
|
|
603
|
+
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
604
|
+
})
|
|
605
|
+
].concat(titleSlot || headerTitle
|
|
606
|
+
? [
|
|
607
|
+
h('span', {
|
|
608
|
+
class: 'vxe-checkbox--label'
|
|
609
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)
|
|
610
|
+
]
|
|
611
|
+
: []))
|
|
612
|
+
])
|
|
613
|
+
)
|
|
568
614
|
},
|
|
569
615
|
renderCheckboxCell (params: VxeTableDefines.CellRenderBodyParams) {
|
|
570
616
|
const { $table, row, column, isHidden } = params
|
|
@@ -786,23 +832,21 @@ export const Cell = {
|
|
|
786
832
|
])
|
|
787
833
|
},
|
|
788
834
|
renderTreeHTMLCell (params: VxeTableDefines.CellRenderBodyParams) {
|
|
789
|
-
return Cell.renderTreeIcon(params, Cell.renderHTMLCell(params)
|
|
835
|
+
return Cell.renderTreeIcon(params, Cell.renderHTMLCell(params))
|
|
790
836
|
},
|
|
791
837
|
|
|
792
838
|
/**
|
|
793
839
|
* 排序和筛选
|
|
794
840
|
*/
|
|
795
841
|
renderSortAndFilterHeader (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
796
|
-
return Cell.
|
|
797
|
-
.concat(Cell.renderSortIcon(params))
|
|
798
|
-
.concat(Cell.renderFilterIcon(params))
|
|
842
|
+
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params))))
|
|
799
843
|
},
|
|
800
844
|
|
|
801
845
|
/**
|
|
802
846
|
* 排序
|
|
803
847
|
*/
|
|
804
848
|
renderSortHeader (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
805
|
-
return Cell.
|
|
849
|
+
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params)))
|
|
806
850
|
},
|
|
807
851
|
renderSortIcon (params: VxeTableDefines.CellRenderHeaderParams | VxeTableDefines.CellRenderHeaderParams) {
|
|
808
852
|
const { $table, column } = params
|
|
@@ -845,7 +889,7 @@ export const Cell = {
|
|
|
845
889
|
* 筛选
|
|
846
890
|
*/
|
|
847
891
|
renderFilterHeader (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
848
|
-
return Cell.
|
|
892
|
+
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderFilterIcon(params)))
|
|
849
893
|
},
|
|
850
894
|
renderFilterIcon (params: VxeTableDefines.CellRenderHeaderParams) {
|
|
851
895
|
const { $table, column, hasFilter } = params
|
|
@@ -892,22 +936,26 @@ export const Cell = {
|
|
|
892
936
|
isRequired = columnRules.some((rule) => rule.required)
|
|
893
937
|
}
|
|
894
938
|
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
939
|
+
let editIconVNs: VNode[] = []
|
|
940
|
+
if (isEnableConf(editConfig)) {
|
|
941
|
+
editIconVNs = [
|
|
942
|
+
isRequired && editOpts.showAsterisk
|
|
943
|
+
? h('i', {
|
|
944
|
+
class: 'vxe-cell--required-icon'
|
|
945
|
+
})
|
|
946
|
+
: renderEmptyElement($table),
|
|
947
|
+
isEnableConf(editRender) && editOpts.showIcon
|
|
948
|
+
? h('i', {
|
|
949
|
+
class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
|
|
950
|
+
})
|
|
951
|
+
: renderEmptyElement($table)
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
return renderHeaderCellBaseVNs(params,
|
|
955
|
+
editIconVNs.concat(Cell.renderHeaderTitle(params))
|
|
956
|
+
.concat(sortable ? Cell.renderSortIcon(params) : [])
|
|
957
|
+
.concat(filters ? Cell.renderFilterIcon(params) : [])
|
|
958
|
+
)
|
|
911
959
|
},
|
|
912
960
|
// 行格编辑模式
|
|
913
961
|
renderRowEdit (params: VxeTableDefines.CellRenderBodyParams) {
|