vxe-table 4.17.11 → 4.17.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/hook.js +3 -6
- package/es/table/module/menu/hook.js +1 -1
- package/es/table/module/menu/panel.js +30 -14
- package/es/table/src/cell.js +8 -39
- package/es/table/src/columnInfo.js +4 -1
- package/es/table/src/table.js +75 -1
- 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 +45 -54
- 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/hook.js +3 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +1 -1
- package/lib/table/module/menu/hook.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 +6 -34
- 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/table.js +3 -2
- 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/hook.ts +3 -6
- package/packages/table/module/menu/hook.ts +3 -3
- package/packages/table/module/menu/panel.ts +30 -14
- package/packages/table/src/cell.ts +8 -38
- package/packages/table/src/columnInfo.ts +5 -1
- package/packages/table/src/table.ts +72 -1
- 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.1762498964248.ttf → iconfont.1762758719777.ttf} +0 -0
- /package/es/{iconfont.1762498964248.woff → iconfont.1762758719777.woff} +0 -0
- /package/es/{iconfont.1762498964248.woff2 → iconfont.1762758719777.woff2} +0 -0
- /package/lib/{iconfont.1762498964248.ttf → iconfont.1762758719777.ttf} +0 -0
- /package/lib/{iconfont.1762498964248.woff → iconfont.1762758719777.woff} +0 -0
- /package/lib/{iconfont.1762498964248.woff2 → iconfont.1762758719777.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!',
|
|
@@ -517,15 +517,12 @@ hooks.add('tableExportModule', {
|
|
|
517
517
|
if (!footLabelMethod) {
|
|
518
518
|
footLabelMethod = columnOpts.footerExportMethod
|
|
519
519
|
}
|
|
520
|
-
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
521
520
|
if (footLabelMethod) {
|
|
521
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
522
522
|
return footLabelMethod({ $table: $xeTable, items: row, itemIndex: _columnIndex, row, _columnIndex, column, options: opts })
|
|
523
523
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
return XEUtils.toValueString(row[_columnIndex])
|
|
527
|
-
}
|
|
528
|
-
return XEUtils.get(row, column.field)
|
|
524
|
+
const cellValue = $xeTable.getFooterCellLabel(row, column)
|
|
525
|
+
return cellValue
|
|
529
526
|
}
|
|
530
527
|
|
|
531
528
|
const toCsv = ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions, columns: VxeTableDefines.ColumnInfo[], datas: any[]) => {
|
|
@@ -248,7 +248,7 @@ hooks.add('tableMenuModule', {
|
|
|
248
248
|
menuMethods.closeMenu()
|
|
249
249
|
},
|
|
250
250
|
ctxMenuMouseoverEvent (evnt, item, child) {
|
|
251
|
-
const menuElem = evnt.currentTarget
|
|
251
|
+
const menuElem = evnt.currentTarget as HTMLDivElement
|
|
252
252
|
const { ctxMenuStore } = reactData
|
|
253
253
|
evnt.preventDefault()
|
|
254
254
|
evnt.stopPropagation()
|
|
@@ -258,7 +258,7 @@ hooks.add('tableMenuModule', {
|
|
|
258
258
|
ctxMenuStore.showChild = hasChildrenList(item)
|
|
259
259
|
if (ctxMenuStore.showChild) {
|
|
260
260
|
nextTick(() => {
|
|
261
|
-
const childWrapperElem = menuElem.nextElementSibling
|
|
261
|
+
const childWrapperElem = menuElem.nextElementSibling as HTMLDivElement
|
|
262
262
|
if (childWrapperElem) {
|
|
263
263
|
const { boundingTop, boundingLeft, visibleHeight, visibleWidth } = getAbsolutePos(menuElem)
|
|
264
264
|
const posTop = boundingTop + menuElem.offsetHeight
|
|
@@ -301,7 +301,7 @@ hooks.add('tableMenuModule', {
|
|
|
301
301
|
const $xeGantt = $xeTable.xeGantt
|
|
302
302
|
|
|
303
303
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
304
|
-
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
304
|
+
if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
305
305
|
const gMenuOpts = menus.get(menu.code)
|
|
306
306
|
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt })
|
|
307
307
|
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null
|
|
@@ -7,7 +7,7 @@ import { getSlotVNs } from '../../../ui/src/vn'
|
|
|
7
7
|
|
|
8
8
|
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods } from '../../../../types'
|
|
9
9
|
|
|
10
|
-
const { getIcon, renderEmptyElement } = VxeUI
|
|
10
|
+
const { getIcon, getI18n, renderEmptyElement } = VxeUI
|
|
11
11
|
|
|
12
12
|
export default defineVxeComponent({
|
|
13
13
|
name: 'VxeTableMenuPanel',
|
|
@@ -56,7 +56,8 @@ export default defineVxeComponent({
|
|
|
56
56
|
class: 'vxe-context-menu--option-wrapper',
|
|
57
57
|
key: gIndex
|
|
58
58
|
}, options.map((item, index) => {
|
|
59
|
-
const
|
|
59
|
+
const { children, loading } = item
|
|
60
|
+
const hasChildMenus = children && children.some((child) => child.visible !== false)
|
|
60
61
|
const prefixOpts = Object.assign({}, item.prefixConfig)
|
|
61
62
|
const prefixIcon = prefixOpts.icon || item.prefixIcon
|
|
62
63
|
const suffixOpts = Object.assign({}, item.suffixConfig)
|
|
@@ -66,6 +67,7 @@ export default defineVxeComponent({
|
|
|
66
67
|
? renderEmptyElement($xeTable)
|
|
67
68
|
: h('li', {
|
|
68
69
|
class: [item.className, {
|
|
70
|
+
'link--loading': loading,
|
|
69
71
|
'link--disabled': item.disabled,
|
|
70
72
|
'link--active': item === ctxMenuStore.selected
|
|
71
73
|
}],
|
|
@@ -86,17 +88,23 @@ export default defineVxeComponent({
|
|
|
86
88
|
h('div', {
|
|
87
89
|
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
88
90
|
}, [
|
|
89
|
-
|
|
90
|
-
? h('span', {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
loading
|
|
92
|
+
? h('span', {
|
|
93
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
94
|
+
})
|
|
95
|
+
: (prefixIcon && XEUtils.isFunction(prefixIcon)
|
|
96
|
+
? h('span', {}, getSlotVNs(prefixIcon({})))
|
|
97
|
+
: h('span', {}, [
|
|
98
|
+
h('i', {
|
|
99
|
+
class: prefixIcon
|
|
100
|
+
})
|
|
101
|
+
])),
|
|
94
102
|
prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
95
103
|
]),
|
|
96
104
|
h('div', {
|
|
97
105
|
class: 'vxe-context-menu--link-content',
|
|
98
106
|
title: menuContent
|
|
99
|
-
}, menuContent),
|
|
107
|
+
}, loading ? getI18n('vxe.table.menuLoading') : menuContent),
|
|
100
108
|
h('div', {
|
|
101
109
|
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
102
110
|
}, [
|
|
@@ -114,6 +122,7 @@ export default defineVxeComponent({
|
|
|
114
122
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
115
123
|
}]
|
|
116
124
|
}, item.children.map((child, cIndex) => {
|
|
125
|
+
const { loading: childLoading } = child
|
|
117
126
|
const childPrefixOpts = Object.assign({}, child.prefixConfig)
|
|
118
127
|
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon
|
|
119
128
|
const childSuffixOpts = Object.assign({}, child.suffixConfig)
|
|
@@ -123,6 +132,7 @@ export default defineVxeComponent({
|
|
|
123
132
|
? null
|
|
124
133
|
: h('li', {
|
|
125
134
|
class: [child.className, {
|
|
135
|
+
'link--loading': childLoading,
|
|
126
136
|
'link--disabled': child.disabled,
|
|
127
137
|
'link--active': child === ctxMenuStore.selectChild
|
|
128
138
|
}],
|
|
@@ -143,17 +153,23 @@ export default defineVxeComponent({
|
|
|
143
153
|
h('div', {
|
|
144
154
|
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
145
155
|
}, [
|
|
146
|
-
|
|
147
|
-
? h('span', {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
156
|
+
child.loading
|
|
157
|
+
? h('span', {
|
|
158
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
159
|
+
})
|
|
160
|
+
: (childPrefixIcon && XEUtils.isFunction(childPrefixIcon)
|
|
161
|
+
? h('span', {}, getSlotVNs(childPrefixIcon({})))
|
|
162
|
+
: h('span', {}, [
|
|
163
|
+
h('i', {
|
|
164
|
+
class: childPrefixIcon
|
|
165
|
+
})
|
|
166
|
+
])),
|
|
151
167
|
childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
152
168
|
]),
|
|
153
169
|
h('div', {
|
|
154
170
|
class: 'vxe-context-menu--link-content',
|
|
155
171
|
title: childMenuContent
|
|
156
|
-
}, childMenuContent),
|
|
172
|
+
}, childLoading ? getI18n('vxe.table.menuLoading') : childMenuContent),
|
|
157
173
|
h('div', {
|
|
158
174
|
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
159
175
|
}, [
|
|
@@ -8,7 +8,7 @@ import { getSlotVNs } from '../../ui/src/vn'
|
|
|
8
8
|
|
|
9
9
|
import type { VxeTableConstructor, VxeTableDefines, VxeTablePrivateMethods, VxeComponentSlotType } from '../../../types'
|
|
10
10
|
|
|
11
|
-
const { getI18n, getIcon, renderer,
|
|
11
|
+
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
13
13
|
function renderTitlePrefixIcon (params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
14
14
|
const { $table, column } = params
|
|
@@ -232,53 +232,23 @@ function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams & {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
function getFooterContent (params: VxeTableDefines.CellRenderFooterParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
235
|
-
const { $table, column,
|
|
236
|
-
const { slots, editRender, cellRender
|
|
235
|
+
const { $table, column, row } = params
|
|
236
|
+
const { slots, editRender, cellRender } = column
|
|
237
237
|
const renderOpts = editRender || cellRender
|
|
238
238
|
const footerSlot = slots ? slots.footer : null
|
|
239
239
|
if (footerSlot) {
|
|
240
240
|
return $table.callSlot(footerSlot, params)
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
// 兼容老模式
|
|
244
|
-
if (XEUtils.isArray(items)) {
|
|
245
|
-
itemValue = items[_columnIndex]
|
|
246
|
-
} else {
|
|
247
|
-
itemValue = XEUtils.get(row, column.field)
|
|
248
|
-
}
|
|
249
|
-
const footParams = Object.assign(params, {
|
|
250
|
-
cellValue: itemValue,
|
|
251
|
-
itemValue
|
|
252
|
-
})
|
|
253
|
-
if (footerFormatter) {
|
|
254
|
-
if (XEUtils.isFunction(footerFormatter)) {
|
|
255
|
-
return [
|
|
256
|
-
h('span', {
|
|
257
|
-
class: 'vxe-cell--label'
|
|
258
|
-
}, `${footerFormatter(footParams)}`)
|
|
259
|
-
]
|
|
260
|
-
}
|
|
261
|
-
const isArr = XEUtils.isArray(footerFormatter)
|
|
262
|
-
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter)
|
|
263
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
264
|
-
if (footerFormatMethod) {
|
|
265
|
-
return [
|
|
266
|
-
h('span', {
|
|
267
|
-
class: 'vxe-cell--label'
|
|
268
|
-
}, `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`)
|
|
269
|
-
]
|
|
270
|
-
}
|
|
271
|
-
return [
|
|
272
|
-
h('span', {
|
|
273
|
-
class: 'vxe-cell--label'
|
|
274
|
-
}, '')
|
|
275
|
-
]
|
|
276
|
-
}
|
|
242
|
+
const itemValue = $table.getFooterCellLabel(row, column)
|
|
277
243
|
if (renderOpts) {
|
|
278
244
|
const compConf = renderer.get(renderOpts.name)
|
|
279
245
|
if (compConf) {
|
|
280
246
|
const rtFooter = compConf.renderTableFooter || compConf.renderFooter
|
|
281
247
|
if (rtFooter) {
|
|
248
|
+
const footParams = Object.assign(params, {
|
|
249
|
+
cellValue: itemValue,
|
|
250
|
+
itemValue
|
|
251
|
+
})
|
|
282
252
|
return getSlotVNs(rtFooter(renderOpts, footParams))
|
|
283
253
|
}
|
|
284
254
|
}
|
|
@@ -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
|
|
|
@@ -28,6 +28,10 @@ export class ColumnInfo {
|
|
|
28
28
|
|
|
29
29
|
const filters = toFilters(_vm.filters, colId)
|
|
30
30
|
|
|
31
|
+
if (headerFormatter) {
|
|
32
|
+
errLog('vxe.error.notProp', ['header-formatter'])
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
32
36
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
33
37
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')])
|
|
@@ -5284,7 +5284,13 @@ export default defineVxeComponent({
|
|
|
5284
5284
|
}
|
|
5285
5285
|
}
|
|
5286
5286
|
}
|
|
5287
|
-
const formatParams = {
|
|
5287
|
+
const formatParams = {
|
|
5288
|
+
cellValue,
|
|
5289
|
+
row,
|
|
5290
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
5291
|
+
column,
|
|
5292
|
+
columnIndex: $xeTable.getColumnIndex(column)
|
|
5293
|
+
}
|
|
5288
5294
|
if (XEUtils.isString(formatter)) {
|
|
5289
5295
|
const gFormatOpts = formats.get(formatter)
|
|
5290
5296
|
const tcFormatMethod = gFormatOpts ? (gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod) : null
|
|
@@ -5302,6 +5308,70 @@ export default defineVxeComponent({
|
|
|
5302
5308
|
}
|
|
5303
5309
|
return cellLabel
|
|
5304
5310
|
},
|
|
5311
|
+
getFooterCellLabel (row, fieldOrColumn) {
|
|
5312
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn)
|
|
5313
|
+
if (!column) {
|
|
5314
|
+
return null
|
|
5315
|
+
}
|
|
5316
|
+
const { footerFormatter } = column
|
|
5317
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column)
|
|
5318
|
+
let itemValue = ''
|
|
5319
|
+
// 兼容老模式
|
|
5320
|
+
if (XEUtils.isArray(row)) {
|
|
5321
|
+
itemValue = row[_columnIndex]
|
|
5322
|
+
} else {
|
|
5323
|
+
itemValue = XEUtils.get(row, column.field)
|
|
5324
|
+
}
|
|
5325
|
+
let cellLabel: any = itemValue
|
|
5326
|
+
if (footerFormatter) {
|
|
5327
|
+
let formatData
|
|
5328
|
+
const { footerTableData } = reactData
|
|
5329
|
+
const { footerFullDataRowData } = internalData
|
|
5330
|
+
const colid = column.id
|
|
5331
|
+
const $rowIndex = footerTableData.indexOf(row)
|
|
5332
|
+
let rowRest: any = null
|
|
5333
|
+
if ($rowIndex > -1) {
|
|
5334
|
+
rowRest = footerFullDataRowData[$rowIndex]
|
|
5335
|
+
if (!rowRest) {
|
|
5336
|
+
rowRest = footerFullDataRowData[$rowIndex] = {}
|
|
5337
|
+
}
|
|
5338
|
+
formatData = rowRest.formatData
|
|
5339
|
+
if (!formatData) {
|
|
5340
|
+
formatData = footerFullDataRowData[$rowIndex].formatData = {}
|
|
5341
|
+
}
|
|
5342
|
+
if (rowRest && formatData[colid]) {
|
|
5343
|
+
if (formatData[colid].value === itemValue) {
|
|
5344
|
+
return formatData[colid].label
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
}
|
|
5348
|
+
const footerFormatParams = {
|
|
5349
|
+
cellValue: itemValue,
|
|
5350
|
+
itemValue,
|
|
5351
|
+
row,
|
|
5352
|
+
items: row,
|
|
5353
|
+
$rowIndex,
|
|
5354
|
+
column,
|
|
5355
|
+
_columnIndex,
|
|
5356
|
+
columnIndex: $xeTable.getColumnIndex(column)
|
|
5357
|
+
}
|
|
5358
|
+
if (XEUtils.isString(footerFormatter)) {
|
|
5359
|
+
const gFormatOpts = formats.get(footerFormatter)
|
|
5360
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
5361
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams) : ''
|
|
5362
|
+
} else if (XEUtils.isArray(footerFormatter)) {
|
|
5363
|
+
const gFormatOpts = formats.get(footerFormatter[0])
|
|
5364
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null
|
|
5365
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams, ...footerFormatter.slice(1)) : ''
|
|
5366
|
+
} else {
|
|
5367
|
+
cellLabel = footerFormatter(footerFormatParams)
|
|
5368
|
+
}
|
|
5369
|
+
if (formatData) {
|
|
5370
|
+
formatData[colid] = { value: itemValue, label: cellLabel }
|
|
5371
|
+
}
|
|
5372
|
+
}
|
|
5373
|
+
return cellLabel
|
|
5374
|
+
},
|
|
5305
5375
|
/**
|
|
5306
5376
|
* 检查是否为临时行数据
|
|
5307
5377
|
*/
|
|
@@ -13101,6 +13171,7 @@ export default defineVxeComponent({
|
|
|
13101
13171
|
footFlag.value++
|
|
13102
13172
|
})
|
|
13103
13173
|
watch(footFlag, () => {
|
|
13174
|
+
internalData.footerFullDataRowData = {}
|
|
13104
13175
|
$xeTable.updateFooter()
|
|
13105
13176
|
})
|
|
13106
13177
|
|
package/packages/ui/index.ts
CHANGED
|
@@ -341,6 +341,7 @@ VxeUI.setIcon({
|
|
|
341
341
|
TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
|
|
342
342
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
343
343
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
344
|
+
TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
|
|
344
345
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
345
346
|
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
346
347
|
TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|