vxe-table 3.19.11 → 3.19.13
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/id-ID.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/ms-MY.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/uz-UZ.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +3 -6
- package/es/table/module/menu/mixin.js +1 -1
- package/es/table/module/menu/panel.js +30 -14
- package/es/table/src/cell.js +8 -27
- package/es/table/src/columnInfo.js +4 -1
- package/es/table/src/methods.js +70 -0
- package/es/table/src/table.js +2 -0
- package/es/table/src/util.js +1 -0
- package/es/table/style.css +6 -3
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +6 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1015 -14059
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +2 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +2 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +2 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +2 -1
- package/lib/locale/lang/id-ID.js +2 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +2 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/ms-MY.js +2 -1
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +2 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +2 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/uz-UZ.js +2 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +2 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +3 -6
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +1 -1
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +21 -7
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/cell.js +7 -29
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +5 -1
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +76 -0
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +2 -0
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +6 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -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 +6 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/id-ID.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/ms-MY.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/uz-UZ.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/export/mixin.ts +3 -6
- package/packages/table/module/menu/mixin.ts +7 -7
- package/packages/table/module/menu/panel.ts +30 -14
- package/packages/table/src/cell.ts +8 -26
- package/packages/table/src/columnInfo.ts +5 -1
- package/packages/table/src/methods.ts +69 -1
- package/packages/table/src/table.ts +2 -0
- package/packages/table/src/util.ts +3 -0
- package/packages/ui/index.ts +1 -0
- package/styles/components/table-module/menu.scss +1 -0
- /package/es/{iconfont.1762498935526.ttf → iconfont.1762758687118.ttf} +0 -0
- /package/es/{iconfont.1762498935526.woff → iconfont.1762758687118.woff} +0 -0
- /package/es/{iconfont.1762498935526.woff2 → iconfont.1762758687118.woff2} +0 -0
- /package/lib/{iconfont.1762498935526.ttf → iconfont.1762758687118.ttf} +0 -0
- /package/lib/{iconfont.1762498935526.woff → iconfont.1762758687118.woff} +0 -0
- /package/lib/{iconfont.1762498935526.woff2 → iconfont.1762758687118.woff2} +0 -0
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Déplacer: {0}',
|
|
90
90
|
resizeColTip: 'Largeur: {0} pixels',
|
|
91
91
|
resizeRowTip: 'Hauteur: {0} pixels',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Veuillez sélectionner au moins un enregistrement!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Mozgás: {0}',
|
|
90
90
|
resizeColTip: 'Szélesség: {0} pixelek',
|
|
91
91
|
resizeRowTip: 'Magasság: {0} pixelek',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Kérjük, válasszon legalább egy rekordot!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Pindahkan: {0}',
|
|
90
90
|
resizeColTip: 'Lebar: {0} piksel',
|
|
91
91
|
resizeRowTip: 'Tinggi: {0} piksel',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Pilih setidaknya satu catatan!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Muovi: {0}',
|
|
90
90
|
resizeColTip: 'Larghezza: {0} pixel',
|
|
91
91
|
resizeRowTip: 'Altezza: {0} pixel',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Seleziona almeno un record!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: '移動:{0}',
|
|
90
90
|
resizeColTip: '幅:{0}ピクセル',
|
|
91
91
|
resizeRowTip: '高:{0}ピクセル',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: '少なくとも1つのレコードを選択してください!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: '움직임 : {0}',
|
|
90
90
|
resizeColTip: '너비 : {0} 픽셀',
|
|
91
91
|
resizeRowTip: '높음 : {0} 픽셀',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: '하나 이상의 레코드를 선택하십시오!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Bergerak: {0}',
|
|
90
90
|
resizeColTip: 'Lebar: {0} piksel',
|
|
91
91
|
resizeRowTip: 'Tinggi: {0} piksel',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Sila pilih sekurang -kurangnya satu rekod!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Flytt: {0}',
|
|
90
90
|
resizeColTip: 'Bredde: {0} piksler',
|
|
91
91
|
resizeRowTip: 'Høyde: {0} piksler',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Velg minst en post!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Move: {0}',
|
|
90
90
|
resizeColTip: 'Largura: {0} pixels',
|
|
91
91
|
resizeRowTip: 'Altura: {0} pixels',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Selecione pelo menos um registro!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'MOVE: {0}',
|
|
90
90
|
resizeColTip: 'Ширина: {0} пиксели',
|
|
91
91
|
resizeRowTip: 'Высокий: {0} пиксели',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Пожалуйста, выберите хотя бы одну запись!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'ย้าย: {0}',
|
|
90
90
|
resizeColTip: 'ความกว้าง: {0} พิกเซล',
|
|
91
91
|
resizeRowTip: 'ความสูง: {0} พิกเซล',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'กรุณาเลือกอย่างน้อยหนึ่งบันทึก!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'يۆتكەش:{0}',
|
|
90
90
|
resizeColTip: '宽:{0} 像素',
|
|
91
91
|
resizeRowTip: '高:{0} 像素',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'كەم بولغاندا بىر تال ئۇچۇر تاللاڭ',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Перемістити: {0}',
|
|
90
90
|
resizeColTip: 'Ширина: {0} пікселів',
|
|
91
91
|
resizeRowTip: 'Висота: {0} пікселів',
|
|
92
|
-
rowGroupContentTotal: '{0} ({1})'
|
|
92
|
+
rowGroupContentTotal: '{0} ({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Виберіть принаймні один запис!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: "Ko'chiring: {0}",
|
|
90
90
|
resizeColTip: 'Kengligi: {0} piksel',
|
|
91
91
|
resizeRowTip: 'Yuqori: {0} piksel',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Iltimos, kamida bitta yozuvni tanlang!',
|
|
@@ -89,7 +89,8 @@ export default {
|
|
|
89
89
|
dragTip: 'Di chuyển: {0}',
|
|
90
90
|
resizeColTip: 'Chiều rộng: {0} pixel',
|
|
91
91
|
resizeRowTip: 'Cao: {0} pixel',
|
|
92
|
-
rowGroupContentTotal: '{0}({1})'
|
|
92
|
+
rowGroupContentTotal: '{0}({1})',
|
|
93
|
+
menuLoading: '加载中...'
|
|
93
94
|
},
|
|
94
95
|
grid: {
|
|
95
96
|
selectOneRecord: 'Vui lòng chọn ít nhất một bản ghi!',
|
|
@@ -248,15 +248,12 @@ function getFooterCellValue ($xeTable: any, opts: VxeTablePropTypes.ExportHandle
|
|
|
248
248
|
if (!footLabelMethod) {
|
|
249
249
|
footLabelMethod = columnOpts.footerExportMethod
|
|
250
250
|
}
|
|
251
|
-
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
252
251
|
if (footLabelMethod) {
|
|
252
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
253
253
|
return footLabelMethod({ $table: $xeTable, items: row, itemIndex: _columnIndex, row, _columnIndex, column, options: opts })
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return XEUtils.toValueString(row[_columnIndex])
|
|
258
|
-
}
|
|
259
|
-
return XEUtils.get(row, column.field)
|
|
255
|
+
const cellValue = $xeTable.getFooterCellLabel(row, column)
|
|
256
|
+
return cellValue
|
|
260
257
|
}
|
|
261
258
|
|
|
262
259
|
function getFooterData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions, footerTableData: any[]) {
|
|
@@ -4,7 +4,7 @@ import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/
|
|
|
4
4
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
5
5
|
import { warnLog } from '../../../ui/src/log'
|
|
6
6
|
|
|
7
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData } from '../../../../types'
|
|
7
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData, TableReactData, VxeTableDefines } from '../../../../types'
|
|
8
8
|
|
|
9
9
|
const { menus, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
10
10
|
|
|
@@ -247,11 +247,11 @@ export default {
|
|
|
247
247
|
}
|
|
248
248
|
$xeTable.closeFilter()
|
|
249
249
|
},
|
|
250
|
-
ctxMenuMouseoverEvent (evnt:
|
|
250
|
+
ctxMenuMouseoverEvent (evnt: Event, item: any, child: any) {
|
|
251
251
|
const $xeTable = this as unknown as VxeTableConstructor & VxeTablePrivateMethods
|
|
252
252
|
const reactData = $xeTable as unknown as TableReactData
|
|
253
253
|
|
|
254
|
-
const menuElem = evnt.currentTarget
|
|
254
|
+
const menuElem = evnt.currentTarget as HTMLDivElement
|
|
255
255
|
const { ctxMenuStore } = reactData
|
|
256
256
|
evnt.preventDefault()
|
|
257
257
|
evnt.stopPropagation()
|
|
@@ -261,7 +261,7 @@ export default {
|
|
|
261
261
|
ctxMenuStore.showChild = hasChildrenList(item)
|
|
262
262
|
if (ctxMenuStore.showChild) {
|
|
263
263
|
$xeTable.$nextTick(() => {
|
|
264
|
-
const childWrapperElem = menuElem.nextElementSibling
|
|
264
|
+
const childWrapperElem = menuElem.nextElementSibling as HTMLDivElement
|
|
265
265
|
if (childWrapperElem) {
|
|
266
266
|
const { boundingTop, boundingLeft, visibleHeight, visibleWidth } = getAbsolutePos(menuElem)
|
|
267
267
|
const posTop = boundingTop + menuElem.offsetHeight
|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
|
-
ctxMenuMouseoutEvent (evnt:
|
|
292
|
+
ctxMenuMouseoutEvent (evnt: Event, item: VxeTableDefines.MenuFirstOption | VxeTableDefines.MenuChildOption) {
|
|
293
293
|
const $xeTable = this as unknown as VxeTableConstructor & VxeTablePrivateMethods
|
|
294
294
|
const reactData = $xeTable as unknown as TableReactData
|
|
295
295
|
|
|
@@ -302,14 +302,14 @@ export default {
|
|
|
302
302
|
/**
|
|
303
303
|
* 快捷菜单点击事件
|
|
304
304
|
*/
|
|
305
|
-
ctxMenuLinkEvent (evnt:
|
|
305
|
+
ctxMenuLinkEvent (evnt: Event, menu: VxeTableDefines.MenuFirstOption | VxeTableDefines.MenuChildOption) {
|
|
306
306
|
const $xeTable = this as unknown as VxeTableConstructor & VxeTablePrivateMethods
|
|
307
307
|
const $xeGrid = $xeTable.$xeGrid
|
|
308
308
|
const $xeGantt = $xeTable.$xeGantt
|
|
309
309
|
const internalData = $xeTable as unknown as TableInternalData
|
|
310
310
|
|
|
311
311
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
312
|
-
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
312
|
+
if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
313
313
|
const gMenuOpts = menus.get(menu.code)
|
|
314
314
|
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt })
|
|
315
315
|
if (gMenuOpts && gMenuOpts.menuMethod) {
|
|
@@ -6,7 +6,7 @@ import { getSlotVNs } from '../../../ui/src/vn'
|
|
|
6
6
|
|
|
7
7
|
import type { VxeTableConstructor, VxeTablePrivateMethods, TableReactData } from '../../../../types'
|
|
8
8
|
|
|
9
|
-
const { getIcon, renderEmptyElement } = VxeUI
|
|
9
|
+
const { getIcon, getI18n, renderEmptyElement } = VxeUI
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
name: 'VxeTableMenuPanel',
|
|
@@ -60,7 +60,8 @@ export default {
|
|
|
60
60
|
class: 'vxe-context-menu--option-wrapper',
|
|
61
61
|
key: gIndex
|
|
62
62
|
}, options.map((item, index) => {
|
|
63
|
-
const
|
|
63
|
+
const { children, loading } = item
|
|
64
|
+
const hasChildMenus = children && children.some((child) => child.visible !== false)
|
|
64
65
|
const prefixOpts = Object.assign({}, item.prefixConfig)
|
|
65
66
|
const prefixIcon = prefixOpts.icon || item.prefixIcon
|
|
66
67
|
const suffixOpts = Object.assign({}, item.suffixConfig)
|
|
@@ -70,6 +71,7 @@ export default {
|
|
|
70
71
|
? renderEmptyElement($xeTable)
|
|
71
72
|
: h('li', {
|
|
72
73
|
class: [item.className, {
|
|
74
|
+
'link--loading': loading,
|
|
73
75
|
'link--disabled': item.disabled,
|
|
74
76
|
'link--active': item === ctxMenuStore.selected
|
|
75
77
|
}],
|
|
@@ -92,11 +94,17 @@ export default {
|
|
|
92
94
|
h('div', {
|
|
93
95
|
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
94
96
|
}, [
|
|
95
|
-
|
|
96
|
-
? h('span', {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
loading
|
|
98
|
+
? h('span', {
|
|
99
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
100
|
+
})
|
|
101
|
+
: (prefixIcon && XEUtils.isFunction(prefixIcon)
|
|
102
|
+
? h('span', {}, getSlotVNs(prefixIcon.call($xeTable, {})))
|
|
103
|
+
: h('span', {}, [
|
|
104
|
+
h('i', {
|
|
105
|
+
class: prefixIcon
|
|
106
|
+
})
|
|
107
|
+
])),
|
|
100
108
|
prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
101
109
|
]),
|
|
102
110
|
h('span', {
|
|
@@ -104,7 +112,7 @@ export default {
|
|
|
104
112
|
attrs: {
|
|
105
113
|
title: menuContent
|
|
106
114
|
}
|
|
107
|
-
}, menuContent),
|
|
115
|
+
}, loading ? getI18n('vxe.table.menuLoading') : menuContent),
|
|
108
116
|
h('div', {
|
|
109
117
|
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
110
118
|
}, [
|
|
@@ -122,6 +130,7 @@ export default {
|
|
|
122
130
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
123
131
|
}]
|
|
124
132
|
}, item.children.map((child, cIndex) => {
|
|
133
|
+
const { loading: childLoading } = child
|
|
125
134
|
const childPrefixOpts = Object.assign({}, child.prefixConfig)
|
|
126
135
|
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon
|
|
127
136
|
const childSuffixOpts = Object.assign({}, child.suffixConfig)
|
|
@@ -131,6 +140,7 @@ export default {
|
|
|
131
140
|
? null
|
|
132
141
|
: h('li', {
|
|
133
142
|
class: [child.className, {
|
|
143
|
+
'link--loading': childLoading,
|
|
134
144
|
'link--disabled': child.disabled,
|
|
135
145
|
'link--active': child === ctxMenuStore.selectChild
|
|
136
146
|
}],
|
|
@@ -153,11 +163,17 @@ export default {
|
|
|
153
163
|
h('div', {
|
|
154
164
|
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
155
165
|
}, [
|
|
156
|
-
|
|
157
|
-
? h('span', {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
child.loading
|
|
167
|
+
? h('span', {
|
|
168
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
169
|
+
})
|
|
170
|
+
: (childPrefixIcon && XEUtils.isFunction(childPrefixIcon)
|
|
171
|
+
? h('span', {}, getSlotVNs(childPrefixIcon({})))
|
|
172
|
+
: h('span', {}, [
|
|
173
|
+
h('i', {
|
|
174
|
+
class: childPrefixIcon
|
|
175
|
+
})
|
|
176
|
+
])),
|
|
161
177
|
childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
162
178
|
]),
|
|
163
179
|
h('span', {
|
|
@@ -165,7 +181,7 @@ export default {
|
|
|
165
181
|
attrs: {
|
|
166
182
|
title: childMenuContent
|
|
167
183
|
}
|
|
168
|
-
}, childMenuContent),
|
|
184
|
+
}, childLoading ? getI18n('vxe.table.menuLoading') : childMenuContent),
|
|
169
185
|
h('div', {
|
|
170
186
|
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
171
187
|
}, [
|
|
@@ -8,7 +8,7 @@ import { getSlotVNs } from '../../ui/src/vn'
|
|
|
8
8
|
|
|
9
9
|
import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, VxeComponentSlotType, TableReactData, TableInternalData } from '../../../types'
|
|
10
10
|
|
|
11
|
-
const { getI18n, getIcon, renderer,
|
|
11
|
+
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
13
13
|
function renderTitlePrefixIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
14
14
|
const { $table, column } = params
|
|
@@ -231,39 +231,21 @@ function renderTitleContent (h: CreateElement, params: VxeTableDefines.CellRende
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
function getFooterContent (h: CreateElement, params: VxeTableDefines.CellRenderFooterParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
234
|
-
const { $table, column,
|
|
235
|
-
const { slots, editRender, cellRender
|
|
234
|
+
const { $table, column, row } = params
|
|
235
|
+
const { slots, editRender, cellRender } = column
|
|
236
236
|
const renderOpts = editRender || cellRender
|
|
237
237
|
if (slots && slots.footer) {
|
|
238
238
|
return $table.callSlot(slots.footer, params, h)
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
// 兼容老模式
|
|
242
|
-
if (XEUtils.isArray(items)) {
|
|
243
|
-
itemValue = items[_columnIndex]
|
|
244
|
-
} else {
|
|
245
|
-
itemValue = XEUtils.get(row, column.field)
|
|
246
|
-
}
|
|
247
|
-
const footParams = Object.assign(params, {
|
|
248
|
-
cellValue: itemValue,
|
|
249
|
-
itemValue
|
|
250
|
-
})
|
|
251
|
-
if (footerFormatter) {
|
|
252
|
-
if (XEUtils.isFunction(footerFormatter)) {
|
|
253
|
-
return `${footerFormatter(footParams)}`
|
|
254
|
-
}
|
|
255
|
-
const isArr = XEUtils.isArray(footerFormatter)
|
|
256
|
-
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter)
|
|
257
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
258
|
-
if (footerFormatMethod) {
|
|
259
|
-
return `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`
|
|
260
|
-
}
|
|
261
|
-
return ''
|
|
262
|
-
}
|
|
240
|
+
const itemValue = $table.getFooterCellLabel(row, column)
|
|
263
241
|
if (renderOpts) {
|
|
264
242
|
const compConf = renderer.get(renderOpts.name)
|
|
265
243
|
const rtFooter = compConf ? (compConf.renderTableFooter || compConf.renderFooter) : null
|
|
266
244
|
if (rtFooter) {
|
|
245
|
+
const footParams = Object.assign(params, {
|
|
246
|
+
cellValue: itemValue,
|
|
247
|
+
itemValue
|
|
248
|
+
})
|
|
267
249
|
return getSlotVNs(rtFooter.call($table, h, renderOpts, footParams))
|
|
268
250
|
}
|
|
269
251
|
}
|
|
@@ -16,7 +16,7 @@ export class ColumnInfo {
|
|
|
16
16
|
const $xeGantt = $xeTable.$xeGantt
|
|
17
17
|
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
18
18
|
|
|
19
|
-
const { field, editRender, filterRender } = _vm
|
|
19
|
+
const { field, editRender, filterRender, headerFormatter } = _vm
|
|
20
20
|
|
|
21
21
|
const colId = _vm.colId || XEUtils.uniqueId('col_')
|
|
22
22
|
|
|
@@ -29,6 +29,10 @@ export class ColumnInfo {
|
|
|
29
29
|
|
|
30
30
|
const filters = toFilters(_vm.filters, colId)
|
|
31
31
|
|
|
32
|
+
if (headerFormatter) {
|
|
33
|
+
errLog('vxe.error.notProp', ['header-formatter'])
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
33
37
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
34
38
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')])
|
|
@@ -5055,7 +5055,7 @@ const Methods = {
|
|
|
5055
5055
|
}
|
|
5056
5056
|
return null
|
|
5057
5057
|
},
|
|
5058
|
-
getCellLabel (row: any, fieldOrColumn:
|
|
5058
|
+
getCellLabel (row: any, fieldOrColumn: string | VxeTableDefines.ColumnInfo) {
|
|
5059
5059
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
5060
5060
|
const internalData = $xeTable as unknown as TableInternalData
|
|
5061
5061
|
|
|
@@ -5101,6 +5101,74 @@ const Methods = {
|
|
|
5101
5101
|
}
|
|
5102
5102
|
return cellLabel
|
|
5103
5103
|
},
|
|
5104
|
+
getFooterCellLabel (row: any, fieldOrColumn: string | VxeTableDefines.ColumnInfo) {
|
|
5105
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
5106
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
5107
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
5108
|
+
|
|
5109
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
5110
|
+
if (!column) {
|
|
5111
|
+
return null
|
|
5112
|
+
}
|
|
5113
|
+
const { footerFormatter } = column
|
|
5114
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
5115
|
+
let itemValue = ''
|
|
5116
|
+
// 兼容老模式
|
|
5117
|
+
if (XEUtils.isArray(row)) {
|
|
5118
|
+
itemValue = row[_columnIndex]
|
|
5119
|
+
} else {
|
|
5120
|
+
itemValue = XEUtils.get(row, column.field)
|
|
5121
|
+
}
|
|
5122
|
+
let cellLabel: any = itemValue
|
|
5123
|
+
if (footerFormatter) {
|
|
5124
|
+
let formatData
|
|
5125
|
+
const { footerTableData } = reactData
|
|
5126
|
+
const { footerFullDataRowData } = internalData
|
|
5127
|
+
const colid = column.id
|
|
5128
|
+
const $rowIndex = footerTableData.indexOf(row)
|
|
5129
|
+
let rowRest: any = null
|
|
5130
|
+
if ($rowIndex > -1) {
|
|
5131
|
+
rowRest = footerFullDataRowData[$rowIndex]
|
|
5132
|
+
if (!rowRest) {
|
|
5133
|
+
rowRest = footerFullDataRowData[$rowIndex] = {}
|
|
5134
|
+
}
|
|
5135
|
+
formatData = rowRest.formatData
|
|
5136
|
+
if (!formatData) {
|
|
5137
|
+
formatData = footerFullDataRowData[$rowIndex].formatData = {}
|
|
5138
|
+
}
|
|
5139
|
+
if (rowRest && formatData[colid]) {
|
|
5140
|
+
if (formatData[colid].value === itemValue) {
|
|
5141
|
+
return formatData[colid].label
|
|
5142
|
+
}
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
const footerFormatParams = {
|
|
5146
|
+
cellValue: itemValue,
|
|
5147
|
+
itemValue,
|
|
5148
|
+
row,
|
|
5149
|
+
items: row,
|
|
5150
|
+
$rowIndex,
|
|
5151
|
+
column,
|
|
5152
|
+
_columnIndex,
|
|
5153
|
+
columnIndex: $xeTable.getColumnIndex(column)
|
|
5154
|
+
}
|
|
5155
|
+
if (XEUtils.isString(footerFormatter)) {
|
|
5156
|
+
const gFormatOpts = formats.get(footerFormatter)
|
|
5157
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
5158
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams) : ''
|
|
5159
|
+
} else if (XEUtils.isArray(footerFormatter)) {
|
|
5160
|
+
const gFormatOpts = formats.get(footerFormatter[0])
|
|
5161
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
5162
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams, ...footerFormatter.slice(1)) : ''
|
|
5163
|
+
} else {
|
|
5164
|
+
cellLabel = footerFormatter(footerFormatParams)
|
|
5165
|
+
}
|
|
5166
|
+
if (formatData) {
|
|
5167
|
+
formatData[colid] = { value: itemValue, label: cellLabel }
|
|
5168
|
+
}
|
|
5169
|
+
}
|
|
5170
|
+
return cellLabel
|
|
5171
|
+
},
|
|
5104
5172
|
/**
|
|
5105
5173
|
* 检查是否为临时行数据
|
|
5106
5174
|
*/
|
|
@@ -1655,7 +1655,9 @@ export default {
|
|
|
1655
1655
|
},
|
|
1656
1656
|
footFlag () {
|
|
1657
1657
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1658
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
1658
1659
|
|
|
1660
|
+
internalData.footerFullDataRowData = {}
|
|
1659
1661
|
$xeTable.updateFooter()
|
|
1660
1662
|
},
|
|
1661
1663
|
|
package/packages/ui/index.ts
CHANGED
|
@@ -342,6 +342,7 @@ VxeUI.setIcon({
|
|
|
342
342
|
TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
|
|
343
343
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
344
344
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
345
|
+
TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
|
|
345
346
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
346
347
|
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
347
348
|
TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|