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
|
@@ -236,15 +236,12 @@ function getFooterCellValue($xeTable, opts, row, column) {
|
|
|
236
236
|
if (!footLabelMethod) {
|
|
237
237
|
footLabelMethod = columnOpts.footerExportMethod;
|
|
238
238
|
}
|
|
239
|
-
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
240
239
|
if (footLabelMethod) {
|
|
240
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
241
241
|
return footLabelMethod({ $table: $xeTable, items: row, itemIndex: _columnIndex, row, _columnIndex, column, options: opts });
|
|
242
242
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
return XEUtils.toValueString(row[_columnIndex]);
|
|
246
|
-
}
|
|
247
|
-
return XEUtils.get(row, column.field);
|
|
243
|
+
const cellValue = $xeTable.getFooterCellLabel(row, column);
|
|
244
|
+
return cellValue;
|
|
248
245
|
}
|
|
249
246
|
function getFooterData($xeTable, opts, footerTableData) {
|
|
250
247
|
const $xeGrid = $xeTable.$xeGrid;
|
|
@@ -306,7 +306,7 @@ export default {
|
|
|
306
306
|
const $xeGantt = $xeTable.$xeGantt;
|
|
307
307
|
const internalData = $xeTable;
|
|
308
308
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
309
|
-
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
309
|
+
if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
310
310
|
const gMenuOpts = menus.get(menu.code);
|
|
311
311
|
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt });
|
|
312
312
|
if (gMenuOpts && gMenuOpts.menuMethod) {
|
|
@@ -2,7 +2,7 @@ import { VxeUI } from '../../../ui';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getFuncText } from '../../../ui/src/utils';
|
|
4
4
|
import { getSlotVNs } from '../../../ui/src/vn';
|
|
5
|
-
const { getIcon, renderEmptyElement } = VxeUI;
|
|
5
|
+
const { getIcon, getI18n, renderEmptyElement } = VxeUI;
|
|
6
6
|
export default {
|
|
7
7
|
name: 'VxeTableMenuPanel',
|
|
8
8
|
props: {
|
|
@@ -52,7 +52,8 @@ export default {
|
|
|
52
52
|
class: 'vxe-context-menu--option-wrapper',
|
|
53
53
|
key: gIndex
|
|
54
54
|
}, options.map((item, index) => {
|
|
55
|
-
const
|
|
55
|
+
const { children, loading } = item;
|
|
56
|
+
const hasChildMenus = children && children.some((child) => child.visible !== false);
|
|
56
57
|
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
57
58
|
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
58
59
|
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
@@ -62,6 +63,7 @@ export default {
|
|
|
62
63
|
? renderEmptyElement($xeTable)
|
|
63
64
|
: h('li', {
|
|
64
65
|
class: [item.className, {
|
|
66
|
+
'link--loading': loading,
|
|
65
67
|
'link--disabled': item.disabled,
|
|
66
68
|
'link--active': item === ctxMenuStore.selected
|
|
67
69
|
}],
|
|
@@ -84,11 +86,17 @@ export default {
|
|
|
84
86
|
h('div', {
|
|
85
87
|
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
86
88
|
}, [
|
|
87
|
-
|
|
88
|
-
? h('span', {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
loading
|
|
90
|
+
? h('span', {
|
|
91
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
92
|
+
})
|
|
93
|
+
: (prefixIcon && XEUtils.isFunction(prefixIcon)
|
|
94
|
+
? h('span', {}, getSlotVNs(prefixIcon.call($xeTable, {})))
|
|
95
|
+
: h('span', {}, [
|
|
96
|
+
h('i', {
|
|
97
|
+
class: prefixIcon
|
|
98
|
+
})
|
|
99
|
+
])),
|
|
92
100
|
prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
93
101
|
]),
|
|
94
102
|
h('span', {
|
|
@@ -96,7 +104,7 @@ export default {
|
|
|
96
104
|
attrs: {
|
|
97
105
|
title: menuContent
|
|
98
106
|
}
|
|
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 {
|
|
|
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 {
|
|
|
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
|
}],
|
|
@@ -145,11 +155,17 @@ export default {
|
|
|
145
155
|
h('div', {
|
|
146
156
|
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
147
157
|
}, [
|
|
148
|
-
|
|
149
|
-
? h('span', {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
158
|
+
child.loading
|
|
159
|
+
? h('span', {
|
|
160
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
161
|
+
})
|
|
162
|
+
: (childPrefixIcon && XEUtils.isFunction(childPrefixIcon)
|
|
163
|
+
? h('span', {}, getSlotVNs(childPrefixIcon({})))
|
|
164
|
+
: h('span', {}, [
|
|
165
|
+
h('i', {
|
|
166
|
+
class: childPrefixIcon
|
|
167
|
+
})
|
|
168
|
+
])),
|
|
153
169
|
childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
154
170
|
]),
|
|
155
171
|
h('span', {
|
|
@@ -157,7 +173,7 @@ export default {
|
|
|
157
173
|
attrs: {
|
|
158
174
|
title: childMenuContent
|
|
159
175
|
}
|
|
160
|
-
}, childMenuContent),
|
|
176
|
+
}, childLoading ? getI18n('vxe.table.menuLoading') : childMenuContent),
|
|
161
177
|
h('div', {
|
|
162
178
|
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
163
179
|
}, [
|
package/es/table/src/cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
|
|
|
4
4
|
import { updateCellTitle } from '../../ui/src/dom';
|
|
5
5
|
import { createColumn, getRowid } from './util';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
|
-
const { getI18n, getIcon, renderer,
|
|
7
|
+
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
8
8
|
function renderTitlePrefixIcon(h, params) {
|
|
9
9
|
const { $table, column } = params;
|
|
10
10
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
@@ -216,40 +216,21 @@ function renderTitleContent(h, params, content) {
|
|
|
216
216
|
];
|
|
217
217
|
}
|
|
218
218
|
function getFooterContent(h, params) {
|
|
219
|
-
const { $table, column,
|
|
220
|
-
const { slots, editRender, cellRender
|
|
219
|
+
const { $table, column, row } = params;
|
|
220
|
+
const { slots, editRender, cellRender } = column;
|
|
221
221
|
const renderOpts = editRender || cellRender;
|
|
222
222
|
if (slots && slots.footer) {
|
|
223
223
|
return $table.callSlot(slots.footer, params, h);
|
|
224
224
|
}
|
|
225
|
-
|
|
226
|
-
// 兼容老模式
|
|
227
|
-
if (XEUtils.isArray(items)) {
|
|
228
|
-
itemValue = items[_columnIndex];
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
itemValue = XEUtils.get(row, column.field);
|
|
232
|
-
}
|
|
233
|
-
const footParams = Object.assign(params, {
|
|
234
|
-
cellValue: itemValue,
|
|
235
|
-
itemValue
|
|
236
|
-
});
|
|
237
|
-
if (footerFormatter) {
|
|
238
|
-
if (XEUtils.isFunction(footerFormatter)) {
|
|
239
|
-
return `${footerFormatter(footParams)}`;
|
|
240
|
-
}
|
|
241
|
-
const isArr = XEUtils.isArray(footerFormatter);
|
|
242
|
-
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter);
|
|
243
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
244
|
-
if (footerFormatMethod) {
|
|
245
|
-
return `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`;
|
|
246
|
-
}
|
|
247
|
-
return '';
|
|
248
|
-
}
|
|
225
|
+
const itemValue = $table.getFooterCellLabel(row, column);
|
|
249
226
|
if (renderOpts) {
|
|
250
227
|
const compConf = renderer.get(renderOpts.name);
|
|
251
228
|
const rtFooter = compConf ? (compConf.renderTableFooter || compConf.renderFooter) : null;
|
|
252
229
|
if (rtFooter) {
|
|
230
|
+
const footParams = Object.assign(params, {
|
|
231
|
+
cellValue: itemValue,
|
|
232
|
+
itemValue
|
|
233
|
+
});
|
|
253
234
|
return getSlotVNs(rtFooter.call($table, h, renderOpts, footParams));
|
|
254
235
|
}
|
|
255
236
|
}
|
|
@@ -11,7 +11,7 @@ export class ColumnInfo {
|
|
|
11
11
|
const $xeGrid = $xeTable.$xeGrid;
|
|
12
12
|
const $xeGantt = $xeTable.$xeGantt;
|
|
13
13
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
14
|
-
const { field, editRender, filterRender } = _vm;
|
|
14
|
+
const { field, editRender, filterRender, headerFormatter } = _vm;
|
|
15
15
|
const colId = _vm.colId || XEUtils.uniqueId('col_');
|
|
16
16
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
17
17
|
const formatter = _vm.formatter;
|
|
@@ -19,6 +19,9 @@ export class ColumnInfo {
|
|
|
19
19
|
const flCompConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
20
20
|
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null;
|
|
21
21
|
const filters = toFilters(_vm.filters, colId);
|
|
22
|
+
if (headerFormatter) {
|
|
23
|
+
errLog('vxe.error.notProp', ['header-formatter']);
|
|
24
|
+
}
|
|
22
25
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
23
26
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
24
27
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
package/es/table/src/methods.js
CHANGED
|
@@ -4905,6 +4905,76 @@ const Methods = {
|
|
|
4905
4905
|
}
|
|
4906
4906
|
return cellLabel;
|
|
4907
4907
|
},
|
|
4908
|
+
getFooterCellLabel(row, fieldOrColumn) {
|
|
4909
|
+
const $xeTable = this;
|
|
4910
|
+
const reactData = $xeTable;
|
|
4911
|
+
const internalData = $xeTable;
|
|
4912
|
+
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
4913
|
+
if (!column) {
|
|
4914
|
+
return null;
|
|
4915
|
+
}
|
|
4916
|
+
const { footerFormatter } = column;
|
|
4917
|
+
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
4918
|
+
let itemValue = '';
|
|
4919
|
+
// 兼容老模式
|
|
4920
|
+
if (XEUtils.isArray(row)) {
|
|
4921
|
+
itemValue = row[_columnIndex];
|
|
4922
|
+
}
|
|
4923
|
+
else {
|
|
4924
|
+
itemValue = XEUtils.get(row, column.field);
|
|
4925
|
+
}
|
|
4926
|
+
let cellLabel = itemValue;
|
|
4927
|
+
if (footerFormatter) {
|
|
4928
|
+
let formatData;
|
|
4929
|
+
const { footerTableData } = reactData;
|
|
4930
|
+
const { footerFullDataRowData } = internalData;
|
|
4931
|
+
const colid = column.id;
|
|
4932
|
+
const $rowIndex = footerTableData.indexOf(row);
|
|
4933
|
+
let rowRest = null;
|
|
4934
|
+
if ($rowIndex > -1) {
|
|
4935
|
+
rowRest = footerFullDataRowData[$rowIndex];
|
|
4936
|
+
if (!rowRest) {
|
|
4937
|
+
rowRest = footerFullDataRowData[$rowIndex] = {};
|
|
4938
|
+
}
|
|
4939
|
+
formatData = rowRest.formatData;
|
|
4940
|
+
if (!formatData) {
|
|
4941
|
+
formatData = footerFullDataRowData[$rowIndex].formatData = {};
|
|
4942
|
+
}
|
|
4943
|
+
if (rowRest && formatData[colid]) {
|
|
4944
|
+
if (formatData[colid].value === itemValue) {
|
|
4945
|
+
return formatData[colid].label;
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
const footerFormatParams = {
|
|
4950
|
+
cellValue: itemValue,
|
|
4951
|
+
itemValue,
|
|
4952
|
+
row,
|
|
4953
|
+
items: row,
|
|
4954
|
+
$rowIndex,
|
|
4955
|
+
column,
|
|
4956
|
+
_columnIndex,
|
|
4957
|
+
columnIndex: $xeTable.getColumnIndex(column)
|
|
4958
|
+
};
|
|
4959
|
+
if (XEUtils.isString(footerFormatter)) {
|
|
4960
|
+
const gFormatOpts = formats.get(footerFormatter);
|
|
4961
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4962
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams) : '';
|
|
4963
|
+
}
|
|
4964
|
+
else if (XEUtils.isArray(footerFormatter)) {
|
|
4965
|
+
const gFormatOpts = formats.get(footerFormatter[0]);
|
|
4966
|
+
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4967
|
+
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams, ...footerFormatter.slice(1)) : '';
|
|
4968
|
+
}
|
|
4969
|
+
else {
|
|
4970
|
+
cellLabel = footerFormatter(footerFormatParams);
|
|
4971
|
+
}
|
|
4972
|
+
if (formatData) {
|
|
4973
|
+
formatData[colid] = { value: itemValue, label: cellLabel };
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
return cellLabel;
|
|
4977
|
+
},
|
|
4908
4978
|
/**
|
|
4909
4979
|
* 检查是否为临时行数据
|
|
4910
4980
|
*/
|
package/es/table/src/table.js
CHANGED
package/es/table/src/util.js
CHANGED
package/es/table/style.css
CHANGED
|
@@ -1716,17 +1716,20 @@
|
|
|
1716
1716
|
.vxe-table--context-menu-clild-wrapper li.link--active > .vxe-context-menu--link {
|
|
1717
1717
|
color: #2B2B2B;
|
|
1718
1718
|
}
|
|
1719
|
-
.vxe-context-menu--option-wrapper li.link--disabled > .vxe-context-menu--link,
|
|
1719
|
+
.vxe-context-menu--option-wrapper li.link--loading > .vxe-context-menu--link, .vxe-context-menu--option-wrapper li.link--disabled > .vxe-context-menu--link,
|
|
1720
|
+
.vxe-table--context-menu-clild-wrapper li.link--loading > .vxe-context-menu--link,
|
|
1720
1721
|
.vxe-table--context-menu-clild-wrapper li.link--disabled > .vxe-context-menu--link {
|
|
1721
1722
|
color: var(--vxe-ui-font-disabled-color);
|
|
1722
1723
|
cursor: no-drop;
|
|
1723
1724
|
}
|
|
1724
|
-
.vxe-context-menu--option-wrapper li.link--disabled.link--active,
|
|
1725
|
+
.vxe-context-menu--option-wrapper li.link--loading.link--active, .vxe-context-menu--option-wrapper li.link--disabled.link--active,
|
|
1726
|
+
.vxe-table--context-menu-clild-wrapper li.link--loading.link--active,
|
|
1725
1727
|
.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active {
|
|
1726
1728
|
border-color: #C0C1C2;
|
|
1727
1729
|
background-color: #EEEEEE;
|
|
1728
1730
|
}
|
|
1729
|
-
.vxe-context-menu--option-wrapper li.link--disabled.link--active:hover,
|
|
1731
|
+
.vxe-context-menu--option-wrapper li.link--loading.link--active:hover, .vxe-context-menu--option-wrapper li.link--disabled.link--active:hover,
|
|
1732
|
+
.vxe-table--context-menu-clild-wrapper li.link--loading.link--active:hover,
|
|
1730
1733
|
.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active:hover {
|
|
1731
1734
|
background-color: inherit;
|
|
1732
1735
|
}
|