vxe-table 4.7.65 → 4.7.67
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 +21 -11
- package/es/locale/lang/en-US.js +4 -1
- package/es/locale/lang/es-ES.js +4 -1
- package/es/locale/lang/hu-HU.js +4 -1
- package/es/locale/lang/ja-JP.js +4 -1
- package/es/locale/lang/ko-KR.js +4 -1
- package/es/locale/lang/pt-BR.js +4 -1
- package/es/locale/lang/ru-RU.js +4 -1
- package/es/locale/lang/vi-VN.js +4 -1
- package/es/locale/lang/zh-CN.js +4 -1
- package/es/locale/lang/zh-TC.js +4 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +12 -11
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +10 -6
- package/es/table/render/index.js +95 -84
- package/es/table/src/table.js +51 -29
- package/es/table/style.css +8 -4
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +7 -7
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +25 -14
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +236 -165
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +4 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -1
- package/lib/locale/lang/es-ES.js +4 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +4 -1
- package/lib/locale/lang/hu-HU.js +4 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +4 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +4 -1
- package/lib/locale/lang/ko-KR.js +4 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +4 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +4 -1
- package/lib/locale/lang/ru-RU.js +4 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/vi-VN.js +4 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +4 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +4 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +4 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +4 -1
- package/lib/locale/lang/zh-TC.js +4 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +4 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +4 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +18 -11
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +11 -13
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +12 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +98 -84
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +48 -26
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +8 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +17 -7
- 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/vxe-table/style/style.css +8 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +22 -11
- package/packages/locale/lang/en-US.ts +4 -1
- package/packages/locale/lang/es-ES.ts +4 -1
- package/packages/locale/lang/hu-HU.ts +4 -1
- package/packages/locale/lang/ja-JP.ts +4 -1
- package/packages/locale/lang/ko-KR.ts +4 -1
- package/packages/locale/lang/pt-BR.ts +4 -1
- package/packages/locale/lang/ru-RU.ts +4 -1
- package/packages/locale/lang/vi-VN.ts +4 -1
- package/packages/locale/lang/zh-CN.ts +4 -1
- package/packages/locale/lang/zh-TC.ts +4 -1
- package/packages/table/module/custom/panel.ts +13 -12
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +10 -6
- package/packages/table/render/index.ts +95 -84
- package/packages/table/src/table.ts +52 -27
- package/packages/toolbar/src/toolbar.ts +8 -8
- package/styles/components/table.scss +6 -3
- /package/es/{iconfont.1723521776225.ttf → iconfont.1724210671876.ttf} +0 -0
- /package/es/{iconfont.1723521776225.woff → iconfont.1724210671876.woff} +0 -0
- /package/es/{iconfont.1723521776225.woff2 → iconfont.1724210671876.woff2} +0 -0
- /package/lib/{iconfont.1723521776225.ttf → iconfont.1724210671876.ttf} +0 -0
- /package/lib/{iconfont.1723521776225.woff → iconfont.1724210671876.woff} +0 -0
- /package/lib/{iconfont.1723521776225.woff2 → iconfont.1724210671876.woff2} +0 -0
|
@@ -306,7 +306,9 @@ export default {
|
|
|
306
306
|
reUpload: '重新上传',
|
|
307
307
|
uploadProgress: '上传中 {0}%',
|
|
308
308
|
uploadErr: '上传失败',
|
|
309
|
-
uploadSuccess: '上传成功'
|
|
309
|
+
uploadSuccess: '上传成功',
|
|
310
|
+
moreBtnText: '更多({0})',
|
|
311
|
+
viewItemTitle: '点击查看'
|
|
310
312
|
},
|
|
311
313
|
formDesign: {
|
|
312
314
|
formName: '表单名称',
|
|
@@ -337,6 +339,7 @@ export default {
|
|
|
337
339
|
group: {
|
|
338
340
|
base: '基础控件',
|
|
339
341
|
layout: '布局控件',
|
|
342
|
+
system: '系统控件',
|
|
340
343
|
advanced: '高级控件'
|
|
341
344
|
},
|
|
342
345
|
copyTitle: '副本_{0}',
|
|
@@ -306,7 +306,9 @@ export default {
|
|
|
306
306
|
reUpload: '重新上传',
|
|
307
307
|
uploadProgress: '上传中 {0}%',
|
|
308
308
|
uploadErr: '上传失败',
|
|
309
|
-
uploadSuccess: '上传成功'
|
|
309
|
+
uploadSuccess: '上传成功',
|
|
310
|
+
moreBtnText: '更多({0})',
|
|
311
|
+
viewItemTitle: '点击查看'
|
|
310
312
|
},
|
|
311
313
|
formDesign: {
|
|
312
314
|
formName: '表单名称',
|
|
@@ -337,6 +339,7 @@ export default {
|
|
|
337
339
|
group: {
|
|
338
340
|
base: '基础控件',
|
|
339
341
|
layout: '布局控件',
|
|
342
|
+
system: '系统控件',
|
|
340
343
|
advanced: '高级控件'
|
|
341
344
|
},
|
|
342
345
|
copyTitle: '副本_{0}',
|
|
@@ -306,7 +306,9 @@ export default {
|
|
|
306
306
|
reUpload: '重新上传',
|
|
307
307
|
uploadProgress: '上传中 {0}%',
|
|
308
308
|
uploadErr: '上传失败',
|
|
309
|
-
uploadSuccess: '上传成功'
|
|
309
|
+
uploadSuccess: '上传成功',
|
|
310
|
+
moreBtnText: '更多({0})',
|
|
311
|
+
viewItemTitle: '点击查看'
|
|
310
312
|
},
|
|
311
313
|
formDesign: {
|
|
312
314
|
formName: '表单名称',
|
|
@@ -337,6 +339,7 @@ export default {
|
|
|
337
339
|
group: {
|
|
338
340
|
base: '基础控件',
|
|
339
341
|
layout: '布局控件',
|
|
342
|
+
system: '系统控件',
|
|
340
343
|
advanced: '高级控件'
|
|
341
344
|
},
|
|
342
345
|
copyTitle: '副本_{0}',
|
|
@@ -304,7 +304,9 @@ export default {
|
|
|
304
304
|
reUpload: '重新上传',
|
|
305
305
|
uploadProgress: '上传中 {0}%',
|
|
306
306
|
uploadErr: '上传失败',
|
|
307
|
-
uploadSuccess: '上传成功'
|
|
307
|
+
uploadSuccess: '上传成功',
|
|
308
|
+
moreBtnText: '更多({0})',
|
|
309
|
+
viewItemTitle: '點擊查看'
|
|
308
310
|
},
|
|
309
311
|
formDesign: {
|
|
310
312
|
formName: '表單名稱',
|
|
@@ -335,6 +337,7 @@ export default {
|
|
|
335
337
|
group: {
|
|
336
338
|
base: '基础控件',
|
|
337
339
|
layout: '布局控件',
|
|
340
|
+
system: '系統控件',
|
|
338
341
|
advanced: '高级控件'
|
|
339
342
|
},
|
|
340
343
|
copyTitle: '副本_{0}',
|
|
@@ -5,7 +5,7 @@ import { addClass, removeClass } from '../../../ui/src/dom'
|
|
|
5
5
|
import { errLog } from '../../../ui/src/log'
|
|
6
6
|
import XEUtils from 'xe-utils'
|
|
7
7
|
|
|
8
|
-
import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent } from 'vxe-pc-ui'
|
|
8
|
+
import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent, VxeButtonEvents } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes } from '../../../../types'
|
|
10
10
|
|
|
11
11
|
const { getI18n, getIcon } = VxeUI
|
|
@@ -55,7 +55,7 @@ export default defineComponent({
|
|
|
55
55
|
}, 300)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const confirmCustomEvent = (
|
|
58
|
+
const confirmCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
59
59
|
const { customColumnList } = reactData
|
|
60
60
|
const customOpts = computeCustomOpts.value
|
|
61
61
|
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
|
|
@@ -82,11 +82,11 @@ export default defineComponent({
|
|
|
82
82
|
}
|
|
83
83
|
})
|
|
84
84
|
$xeTable.closeCustom()
|
|
85
|
-
$xeTable.emitCustomEvent('confirm',
|
|
85
|
+
$xeTable.emitCustomEvent('confirm', $event)
|
|
86
86
|
$xeTable.saveCustomStore('confirm')
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
const cancelCustomEvent = (
|
|
89
|
+
const cancelCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
90
90
|
const { customStore } = props
|
|
91
91
|
const { customColumnList } = reactData
|
|
92
92
|
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
|
|
@@ -112,7 +112,7 @@ export default defineComponent({
|
|
|
112
112
|
}
|
|
113
113
|
}, { children: 'children' })
|
|
114
114
|
$xeTable.closeCustom()
|
|
115
|
-
$xeTable.emitCustomEvent('cancel',
|
|
115
|
+
$xeTable.emitCustomEvent('cancel', $event)
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
const handleResetCustomEvent = (evnt: Event) => {
|
|
@@ -121,7 +121,7 @@ export default defineComponent({
|
|
|
121
121
|
$xeTable.emitCustomEvent('reset', evnt)
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
const resetCustomEvent = (
|
|
124
|
+
const resetCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
125
125
|
if (VxeUI.modal) {
|
|
126
126
|
VxeUI.modal.confirm({
|
|
127
127
|
content: getI18n('vxe.custom.cstmConfirmRestore'),
|
|
@@ -129,11 +129,11 @@ export default defineComponent({
|
|
|
129
129
|
escClosable: true
|
|
130
130
|
}).then(type => {
|
|
131
131
|
if (type === 'confirm') {
|
|
132
|
-
handleResetCustomEvent(
|
|
132
|
+
handleResetCustomEvent($event)
|
|
133
133
|
}
|
|
134
134
|
})
|
|
135
135
|
} else {
|
|
136
|
-
handleResetCustomEvent(
|
|
136
|
+
handleResetCustomEvent($event)
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -185,7 +185,7 @@ export default defineComponent({
|
|
|
185
185
|
// }
|
|
186
186
|
// }
|
|
187
187
|
|
|
188
|
-
const
|
|
188
|
+
const allOptionEvent = () => {
|
|
189
189
|
const { customStore } = props
|
|
190
190
|
const { customColumnList } = reactData
|
|
191
191
|
const customOpts = computeCustomOpts.value
|
|
@@ -435,7 +435,7 @@ export default defineComponent({
|
|
|
435
435
|
'is--indeterminate': isAllIndeterminate
|
|
436
436
|
}],
|
|
437
437
|
title: getI18n('vxe.table.allTitle'),
|
|
438
|
-
onClick:
|
|
438
|
+
onClick: allOptionEvent
|
|
439
439
|
}, [
|
|
440
440
|
h('span', {
|
|
441
441
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
@@ -678,7 +678,7 @@ export default defineComponent({
|
|
|
678
678
|
'is--indeterminate': isAllIndeterminate
|
|
679
679
|
}],
|
|
680
680
|
title: getI18n('vxe.table.allTitle'),
|
|
681
|
-
onClick:
|
|
681
|
+
onClick: allOptionEvent
|
|
682
682
|
}, [
|
|
683
683
|
h('span', {
|
|
684
684
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
@@ -697,7 +697,8 @@ export default defineComponent({
|
|
|
697
697
|
VxeUITooltipComponent
|
|
698
698
|
? h(VxeUITooltipComponent, {
|
|
699
699
|
enterable: true,
|
|
700
|
-
content: getI18n('vxe.custom.setting.sortHelpTip')
|
|
700
|
+
content: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
701
|
+
popupClassName: 'vxe-table--ignore-clear'
|
|
701
702
|
}, {
|
|
702
703
|
default: () => {
|
|
703
704
|
return h('i', {
|
|
@@ -764,25 +764,26 @@ hooks.add('tableEditModule', {
|
|
|
764
764
|
const { editRender } = column
|
|
765
765
|
if (isEnableConf(editRender)) {
|
|
766
766
|
const compRender = renderer.get(editRender.name)
|
|
767
|
-
let
|
|
767
|
+
let autoFocus = editRender.autofocus || editRender.autoFocus
|
|
768
|
+
let autoSelect = editRender.autoSelect || editRender.autoselect
|
|
768
769
|
let inputElem
|
|
769
|
-
if (!
|
|
770
|
-
|
|
770
|
+
if (!autoFocus && compRender) {
|
|
771
|
+
autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autofocus
|
|
771
772
|
}
|
|
772
|
-
if (!
|
|
773
|
-
|
|
773
|
+
if (!autoSelect && compRender) {
|
|
774
|
+
autoSelect = compRender.tableAutoSelect || compRender.autoselect
|
|
774
775
|
}
|
|
775
776
|
// 如果指定了聚焦 class
|
|
776
|
-
if (XEUtils.isFunction(
|
|
777
|
-
inputElem =
|
|
778
|
-
} else if (
|
|
779
|
-
inputElem = cell.querySelector(
|
|
777
|
+
if (XEUtils.isFunction(autoFocus)) {
|
|
778
|
+
inputElem = autoFocus(params)
|
|
779
|
+
} else if (autoFocus) {
|
|
780
|
+
inputElem = cell.querySelector(autoFocus)
|
|
780
781
|
if (inputElem) {
|
|
781
782
|
inputElem.focus()
|
|
782
783
|
}
|
|
783
784
|
}
|
|
784
785
|
if (inputElem) {
|
|
785
|
-
if (
|
|
786
|
+
if (autoSelect) {
|
|
786
787
|
inputElem.select()
|
|
787
788
|
} else {
|
|
788
789
|
// 保持一致行为,光标移到末端
|
|
@@ -294,7 +294,7 @@ hooks.add('tableExportModule', {
|
|
|
294
294
|
return row[childrenField] && row[childrenField].length
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
const getSeq = (row: any, $rowIndex: any, column: any, $columnIndex: any) => {
|
|
297
|
+
const getSeq = (cellValue: any, row: any, $rowIndex: any, column: any, $columnIndex: any) => {
|
|
298
298
|
const seqOpts = computeSeqOpts.value
|
|
299
299
|
const seqMethod = seqOpts.seqMethod || column.seqMethod
|
|
300
300
|
if (seqMethod) {
|
|
@@ -307,7 +307,7 @@ hooks.add('tableExportModule', {
|
|
|
307
307
|
$columnIndex
|
|
308
308
|
})
|
|
309
309
|
}
|
|
310
|
-
return
|
|
310
|
+
return cellValue
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
function getHeaderTitle (opts: any, column: any) {
|
|
@@ -363,9 +363,11 @@ hooks.add('tableExportModule', {
|
|
|
363
363
|
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts })
|
|
364
364
|
} else {
|
|
365
365
|
switch (column.type) {
|
|
366
|
-
case 'seq':
|
|
367
|
-
|
|
366
|
+
case 'seq': {
|
|
367
|
+
const seqVal = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('')
|
|
368
|
+
cellValue = mode === 'all' ? seqVal : getSeq(seqVal, row, $rowIndex, column, $columnIndex)
|
|
368
369
|
break
|
|
370
|
+
}
|
|
369
371
|
case 'checkbox':
|
|
370
372
|
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row))
|
|
371
373
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : ''
|
|
@@ -419,9 +421,11 @@ hooks.add('tableExportModule', {
|
|
|
419
421
|
cellValue = exportLabelMethod({ $table: $xeTable, row, column, options: opts })
|
|
420
422
|
} else {
|
|
421
423
|
switch (column.type) {
|
|
422
|
-
case 'seq':
|
|
423
|
-
|
|
424
|
+
case 'seq': {
|
|
425
|
+
const seqValue = $rowIndex + 1
|
|
426
|
+
cellValue = mode === 'all' ? seqValue : getSeq(seqValue, row, $rowIndex, column, $columnIndex)
|
|
424
427
|
break
|
|
428
|
+
}
|
|
425
429
|
case 'checkbox':
|
|
426
430
|
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row))
|
|
427
431
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : ''
|
|
@@ -436,14 +436,14 @@ function oldFilterRender (renderOpts: any, params: any) {
|
|
|
436
436
|
|
|
437
437
|
function handleFilterMethod ({ option, row, column }: any) {
|
|
438
438
|
const { data } = option
|
|
439
|
-
const cellValue = XEUtils.get(row, column.
|
|
439
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
440
440
|
/* eslint-disable eqeqeq */
|
|
441
441
|
return cellValue == data
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
function handleInputFilterMethod ({ option, row, column }: any) {
|
|
445
445
|
const { data } = option
|
|
446
|
-
const cellValue = XEUtils.get(row, column.
|
|
446
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
447
447
|
/* eslint-disable eqeqeq */
|
|
448
448
|
return XEUtils.toValueString(cellValue).indexOf(data) > -1
|
|
449
449
|
}
|
|
@@ -501,7 +501,7 @@ function oldSelectEditRender (renderOpts: any, params: any) {
|
|
|
501
501
|
|
|
502
502
|
function getSelectCellValue (renderOpts: any, { row, column }: any) {
|
|
503
503
|
const { options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts
|
|
504
|
-
const cellValue = XEUtils.get(row, column.
|
|
504
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
505
505
|
let selectItem: any
|
|
506
506
|
const labelProp = optionProps.label || 'label'
|
|
507
507
|
const valueProp = optionProps.value || 'value'
|
|
@@ -536,7 +536,7 @@ function handleExportSelectMethod (params: any) {
|
|
|
536
536
|
|
|
537
537
|
function getTreeSelectCellValue (renderOpts: any, { row, column }: any) {
|
|
538
538
|
const { options, optionProps = {} } = renderOpts
|
|
539
|
-
const cellValue = XEUtils.get(row, column.
|
|
539
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
540
540
|
const labelProp = optionProps.label || 'label'
|
|
541
541
|
const valueProp = optionProps.value || 'value'
|
|
542
542
|
const childrenProp = optionProps.children || 'children'
|
|
@@ -564,23 +564,23 @@ function handleExportTreeSelectMethod (params: any) {
|
|
|
564
564
|
*/
|
|
565
565
|
renderer.mixin({
|
|
566
566
|
input: {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
567
|
+
tableAutoFocus: 'input',
|
|
568
|
+
renderTableEdit: nativeEditRender,
|
|
569
|
+
renderTableDefault: nativeEditRender,
|
|
570
|
+
renderTableFilter: nativeFilterRender,
|
|
571
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
572
572
|
},
|
|
573
573
|
textarea: {
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
tableAutoFocus: 'textarea',
|
|
575
|
+
renderTableEdit: nativeEditRender
|
|
576
576
|
},
|
|
577
577
|
select: {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
renderTableEdit: nativeSelectEditRender,
|
|
579
|
+
renderTableDefault: nativeSelectEditRender,
|
|
580
|
+
renderTableCell (renderOpts, params) {
|
|
581
581
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
582
582
|
},
|
|
583
|
-
|
|
583
|
+
renderTableFilter (renderOpts, params) {
|
|
584
584
|
const { column } = params
|
|
585
585
|
return column.filters.map((option, oIndex) => {
|
|
586
586
|
return h('select', {
|
|
@@ -592,17 +592,17 @@ renderer.mixin({
|
|
|
592
592
|
renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeOptions) : renderNativeOptions(renderOpts.options, renderOpts, params))
|
|
593
593
|
})
|
|
594
594
|
},
|
|
595
|
-
|
|
596
|
-
|
|
595
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
596
|
+
tableExportMethod: handleExportSelectMethod
|
|
597
597
|
},
|
|
598
598
|
VxeInput: {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
599
|
+
tableAutoFocus: 'input',
|
|
600
|
+
renderTableEdit: defaultEditRender,
|
|
601
|
+
renderTableCell (renderOpts, params) {
|
|
602
602
|
const { props = {} } = renderOpts
|
|
603
603
|
const { row, column } = params
|
|
604
604
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
605
|
-
let cellValue = XEUtils.get(row, column.
|
|
605
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
606
606
|
if (cellValue) {
|
|
607
607
|
switch (props.type) {
|
|
608
608
|
case 'date':
|
|
@@ -619,18 +619,18 @@ renderer.mixin({
|
|
|
619
619
|
}
|
|
620
620
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
621
621
|
},
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
renderTableDefault: defaultEditRender,
|
|
623
|
+
renderTableFilter: defaultFilterRender,
|
|
624
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
625
625
|
},
|
|
626
626
|
VxeNumberInput: {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
tableAutoFocus: 'input',
|
|
628
|
+
renderTableEdit: defaultEditRender,
|
|
629
|
+
renderTableCell (renderOpts, params) {
|
|
630
630
|
const { props = {} } = renderOpts
|
|
631
631
|
const { row, column } = params
|
|
632
632
|
const digits = props.digits || getConfig().numberInput?.digits || 2
|
|
633
|
-
let cellValue = XEUtils.get(row, column.
|
|
633
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
634
634
|
if (cellValue) {
|
|
635
635
|
switch (props.type) {
|
|
636
636
|
case 'float':
|
|
@@ -640,17 +640,17 @@ renderer.mixin({
|
|
|
640
640
|
}
|
|
641
641
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
642
642
|
},
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
renderTableDefault: defaultEditRender,
|
|
644
|
+
renderTableFilter: defaultFilterRender,
|
|
645
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
646
646
|
},
|
|
647
647
|
VxeDatePicker: {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
tableAutoFocus: 'input',
|
|
649
|
+
renderTableEdit: defaultEditRender,
|
|
650
|
+
renderTableCell (renderOpts, params) {
|
|
651
651
|
const { props = {} } = renderOpts
|
|
652
652
|
const { row, column } = params
|
|
653
|
-
let cellValue = XEUtils.get(row, column.
|
|
653
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
654
654
|
if (cellValue) {
|
|
655
655
|
switch (props.type) {
|
|
656
656
|
case 'date':
|
|
@@ -664,18 +664,18 @@ renderer.mixin({
|
|
|
664
664
|
}
|
|
665
665
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
666
666
|
},
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
667
|
+
renderTableDefault: defaultEditRender,
|
|
668
|
+
renderTableFilter: defaultFilterRender,
|
|
669
|
+
tableFilterDefaultMethod: handleFilterMethod
|
|
670
670
|
},
|
|
671
671
|
VxeTextarea: {
|
|
672
|
-
|
|
672
|
+
tableAutoFocus: 'VxeTextarea'
|
|
673
673
|
},
|
|
674
674
|
VxeButton: {
|
|
675
|
-
|
|
675
|
+
renderTableDefault: buttonCellRender
|
|
676
676
|
},
|
|
677
677
|
VxeButtonGroup: {
|
|
678
|
-
|
|
678
|
+
renderTableDefault (renderOpts, params) {
|
|
679
679
|
const { options } = renderOpts
|
|
680
680
|
return [
|
|
681
681
|
h(getDefaultComponent(renderOpts), {
|
|
@@ -687,13 +687,13 @@ renderer.mixin({
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
VxeSelect: {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
690
|
+
tableAutoFocus: 'input',
|
|
691
|
+
renderTableEdit: defaultSelectEditRender,
|
|
692
|
+
renderTableDefault: defaultSelectEditRender,
|
|
693
|
+
renderTableCell (renderOpts, params) {
|
|
694
694
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
695
695
|
},
|
|
696
|
-
|
|
696
|
+
renderTableFilter (renderOpts, params) {
|
|
697
697
|
const { column } = params
|
|
698
698
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
699
699
|
return column.filters.map((option, oIndex) => {
|
|
@@ -705,35 +705,46 @@ renderer.mixin({
|
|
|
705
705
|
})
|
|
706
706
|
})
|
|
707
707
|
},
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
709
|
+
tableExportMethod: handleExportSelectMethod
|
|
710
710
|
},
|
|
711
711
|
VxeTreeSelect: {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
712
|
+
tableAutoFocus: 'input',
|
|
713
|
+
renderTableEdit: defaultTreeSelectEditRender,
|
|
714
|
+
renderTableCell (renderOpts, params) {
|
|
715
715
|
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params))
|
|
716
716
|
},
|
|
717
|
-
|
|
717
|
+
tableExportMethod: handleExportTreeSelectMethod
|
|
718
|
+
},
|
|
719
|
+
VxeIconPicker: {
|
|
720
|
+
tableAutoFocus: 'input',
|
|
721
|
+
renderTableEdit: defaultEditRender,
|
|
722
|
+
renderTableCell (renderOpts, params) {
|
|
723
|
+
const { row, column } = params
|
|
724
|
+
const cellValue = XEUtils.get(row, column.field)
|
|
725
|
+
return h('i', {
|
|
726
|
+
class: cellValue
|
|
727
|
+
})
|
|
728
|
+
}
|
|
718
729
|
},
|
|
719
730
|
VxeRadioGroup: {
|
|
720
|
-
|
|
731
|
+
renderTableDefault: radioAndCheckboxEditRender
|
|
721
732
|
},
|
|
722
733
|
VxeCheckboxGroup: {
|
|
723
|
-
|
|
734
|
+
renderTableDefault: radioAndCheckboxEditRender
|
|
724
735
|
},
|
|
725
736
|
VxeSwitch: {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
737
|
+
tableAutoFocus: 'button',
|
|
738
|
+
renderTableEdit: defaultEditRender,
|
|
739
|
+
renderTableDefault: defaultEditRender
|
|
729
740
|
},
|
|
730
741
|
VxeUpload: {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
742
|
+
renderTableEdit: defaultEditRender,
|
|
743
|
+
renderTableCell: defaultEditRender,
|
|
744
|
+
renderTableDefault: defaultEditRender
|
|
734
745
|
},
|
|
735
746
|
VxeImage: {
|
|
736
|
-
|
|
747
|
+
renderTableDefault (renderOpts, params) {
|
|
737
748
|
const { row, column } = params
|
|
738
749
|
const { props } = renderOpts
|
|
739
750
|
const cellValue = getCellValue(row, column)
|
|
@@ -747,7 +758,7 @@ renderer.mixin({
|
|
|
747
758
|
}
|
|
748
759
|
},
|
|
749
760
|
VxeImageGroup: {
|
|
750
|
-
|
|
761
|
+
renderTableDefault (renderOpts, params) {
|
|
751
762
|
const { row, column } = params
|
|
752
763
|
const { props } = renderOpts
|
|
753
764
|
const cellValue = getCellValue(row, column)
|
|
@@ -763,13 +774,13 @@ renderer.mixin({
|
|
|
763
774
|
|
|
764
775
|
// 以下已废弃
|
|
765
776
|
$input: {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
777
|
+
tableAutoFocus: '.vxe-input--inner',
|
|
778
|
+
renderTableEdit: oldEditRender,
|
|
779
|
+
renderTableCell (renderOpts, params) {
|
|
769
780
|
const { props = {} } = renderOpts
|
|
770
781
|
const { row, column } = params
|
|
771
782
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
772
|
-
let cellValue = XEUtils.get(row, column.
|
|
783
|
+
let cellValue = XEUtils.get(row, column.field)
|
|
773
784
|
if (cellValue) {
|
|
774
785
|
switch (props.type) {
|
|
775
786
|
case 'date':
|
|
@@ -785,27 +796,27 @@ renderer.mixin({
|
|
|
785
796
|
}
|
|
786
797
|
return getCellLabelVNs(renderOpts, params, cellValue)
|
|
787
798
|
},
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
799
|
+
renderTableDefault: oldEditRender,
|
|
800
|
+
renderTableFilter: oldFilterRender,
|
|
801
|
+
tableFilterDefaultMethod: handleInputFilterMethod
|
|
791
802
|
},
|
|
792
803
|
$textarea: {
|
|
793
|
-
|
|
804
|
+
tableAutoFocus: '.vxe-textarea--inner'
|
|
794
805
|
},
|
|
795
806
|
$button: {
|
|
796
|
-
|
|
807
|
+
renderTableDefault: oldButtonEditRender
|
|
797
808
|
},
|
|
798
809
|
$buttons: {
|
|
799
|
-
|
|
810
|
+
renderTableDefault: oldButtonsEditRender
|
|
800
811
|
},
|
|
801
812
|
$select: {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
813
|
+
tableAutoFocus: '.vxe-input--inner',
|
|
814
|
+
renderTableEdit: oldSelectEditRender,
|
|
815
|
+
renderTableDefault: oldSelectEditRender,
|
|
816
|
+
renderTableCell (renderOpts, params) {
|
|
806
817
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
807
818
|
},
|
|
808
|
-
|
|
819
|
+
renderTableFilter (renderOpts, params) {
|
|
809
820
|
const { column } = params
|
|
810
821
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
811
822
|
return column.filters.map((option, oIndex) => {
|
|
@@ -817,19 +828,19 @@ renderer.mixin({
|
|
|
817
828
|
})
|
|
818
829
|
})
|
|
819
830
|
},
|
|
820
|
-
|
|
821
|
-
|
|
831
|
+
tableFilterDefaultMethod: handleFilterMethod,
|
|
832
|
+
tableExportMethod: handleExportSelectMethod
|
|
822
833
|
},
|
|
823
834
|
$radio: {
|
|
824
|
-
|
|
835
|
+
tableAutoFocus: '.vxe-radio--input'
|
|
825
836
|
},
|
|
826
837
|
$checkbox: {
|
|
827
|
-
|
|
838
|
+
tableAutoFocus: '.vxe-checkbox--input'
|
|
828
839
|
},
|
|
829
840
|
$switch: {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
841
|
+
tableAutoFocus: '.vxe-switch--button',
|
|
842
|
+
renderTableEdit: oldEditRender,
|
|
843
|
+
renderTableDefault: oldEditRender
|
|
833
844
|
}
|
|
834
845
|
// 以上已废弃
|
|
835
846
|
})
|