vxe-table 3.12.10-beta.8 → 3.12.10
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 +4 -3
- 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/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/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +4 -3
- 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 +518 -517
- 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/edit/mixin.js +7 -7
- package/es/table/module/export/mixin.js +105 -69
- package/es/table/module/keyboard/mixin.js +68 -25
- package/es/table/module/menu/mixin.js +3 -1
- package/es/table/src/body.js +135 -83
- package/es/table/src/cell.js +43 -57
- package/es/table/src/column.js +43 -8
- package/es/table/src/columnInfo.js +3 -0
- package/es/table/src/footer.js +50 -9
- package/es/table/src/header.js +70 -168
- package/es/table/src/methods.js +985 -502
- package/es/table/src/props.js +14 -4
- package/es/table/src/table.js +114 -33
- package/es/table/src/util.js +73 -57
- package/es/table/style.css +253 -189
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +26 -10
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +253 -189
- 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 +1782 -1056
- 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/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +4 -3
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +4 -3
- 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/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/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -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/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -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 +4 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +4 -3
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +518 -517
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +518 -517
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -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/edit/mixin.js +7 -2
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +105 -64
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +73 -27
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +3 -1
- package/lib/table/src/body.js +132 -79
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +32 -42
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +12 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +46 -7
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +52 -175
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +1096 -560
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +14 -4
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +113 -36
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +87 -70
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +253 -189
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +26 -10
- 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 +253 -189
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- 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 +4 -3
- 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/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/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +4 -3
- 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 +518 -517
- 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/edit/mixin.ts +7 -7
- package/packages/table/module/export/mixin.ts +138 -80
- package/packages/table/module/keyboard/mixin.ts +65 -24
- package/packages/table/module/menu/mixin.ts +4 -1
- package/packages/table/src/body.ts +148 -86
- package/packages/table/src/cell.ts +45 -67
- package/packages/table/src/column.ts +48 -10
- package/packages/table/src/columnInfo.ts +3 -0
- package/packages/table/src/footer.ts +53 -10
- package/packages/table/src/header.ts +70 -169
- package/packages/table/src/methods.ts +1031 -515
- package/packages/table/src/props.ts +16 -6
- package/packages/table/src/table.ts +124 -33
- package/packages/table/src/util.ts +82 -62
- package/packages/ui/index.ts +25 -9
- package/styles/components/table.scss +319 -271
- package/styles/theme/base.scss +4 -6
- package/styles/theme/dark.scss +1 -0
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +1 -0
- /package/es/{iconfont.1736840896964.ttf → iconfont.1738985837413.ttf} +0 -0
- /package/es/{iconfont.1736840896964.woff → iconfont.1738985837413.woff} +0 -0
- /package/es/{iconfont.1736840896964.woff2 → iconfont.1738985837413.woff2} +0 -0
- /package/lib/{iconfont.1736840896964.ttf → iconfont.1738985837413.ttf} +0 -0
- /package/lib/{iconfont.1736840896964.woff → iconfont.1738985837413.woff} +0 -0
- /package/lib/{iconfont.1736840896964.woff2 → iconfont.1738985837413.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -11,10 +11,10 @@ const isVMScrollProcess = ($xeTable) => {
|
|
|
11
11
|
const tableProps = $xeTable;
|
|
12
12
|
const tableReactData = $xeTable;
|
|
13
13
|
const { delayHover } = tableProps;
|
|
14
|
-
const { lastScrollTime,
|
|
15
|
-
return !!(
|
|
14
|
+
const { lastScrollTime, isDragResize } = tableReactData;
|
|
15
|
+
return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + delayHover));
|
|
16
16
|
};
|
|
17
|
-
function renderLine(h, _vm, params) {
|
|
17
|
+
function renderLine(h, _vm, params, cellHeight) {
|
|
18
18
|
const $xeTable = _vm.$parent;
|
|
19
19
|
const tableProps = $xeTable;
|
|
20
20
|
const tableInternalData = $xeTable;
|
|
@@ -39,12 +39,14 @@ function renderLine(h, _vm, params) {
|
|
|
39
39
|
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
40
40
|
return [
|
|
41
41
|
h('div', {
|
|
42
|
+
key: 'tl',
|
|
42
43
|
class: 'vxe-tree--line-wrapper'
|
|
43
44
|
}, [
|
|
44
45
|
h('div', {
|
|
45
46
|
class: 'vxe-tree--line',
|
|
46
47
|
style: {
|
|
47
48
|
height: `${isFirstRow ? 1 : calcTreeLine(params, prevRow)}px`,
|
|
49
|
+
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
48
50
|
left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
|
|
49
51
|
}
|
|
50
52
|
})
|
|
@@ -62,26 +64,29 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
62
64
|
const tableReactData = $xeTable;
|
|
63
65
|
const tableInternalData = $xeTable;
|
|
64
66
|
const { fullAllDataRowIdData } = tableInternalData;
|
|
65
|
-
const { columnKey,
|
|
66
|
-
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad,
|
|
67
|
+
const { columnKey, resizable: allResizable, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
68
|
+
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
67
69
|
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData;
|
|
68
70
|
const cellOpts = $xeTable.computeCellOpts;
|
|
69
71
|
const validOpts = $xeTable.computeValidOpts;
|
|
70
72
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
71
73
|
const editOpts = $xeTable.computeEditOpts;
|
|
72
74
|
const tooltipOpts = $xeTable.computeTooltipOpts;
|
|
75
|
+
const { isAllColumnDrag, isAllRowDrag } = $xeTable.resizableOpts;
|
|
73
76
|
const rowOpts = $xeTable.computeRowOpts;
|
|
74
77
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
75
78
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
79
|
+
const customCellHeight = cellOpts.height || rowOpts.height;
|
|
80
|
+
const currCellHeight = customCellHeight || defaultRowHeight;
|
|
76
81
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts;
|
|
77
82
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
78
83
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
79
84
|
const areaOpts = $xeTable.computeAreaOpts;
|
|
80
85
|
const { selectCellToRow } = areaOpts;
|
|
81
|
-
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column;
|
|
82
|
-
const { verticalAlign } = cellOpts;
|
|
86
|
+
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
87
|
+
const { verticalAlign: allVerticalAlign } = cellOpts;
|
|
83
88
|
const { actived } = editStore;
|
|
84
|
-
const
|
|
89
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
85
90
|
const colid = column.id;
|
|
86
91
|
const renderOpts = editRender || cellRender;
|
|
87
92
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
@@ -91,21 +96,25 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
91
96
|
const columnIndex = $xeTable.getColumnIndex(column);
|
|
92
97
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
93
98
|
const isEdit = isEnableConf(editRender);
|
|
99
|
+
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
94
100
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
95
|
-
const
|
|
101
|
+
const isCellPadding = XEUtils.eqNull(padding) ? (allPadding === null ? cellOpts.padding : allPadding) : padding;
|
|
102
|
+
const cellOverflow = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
96
103
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
97
104
|
const showTitle = cellOverflow === 'title';
|
|
98
105
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
99
|
-
|
|
100
|
-
const
|
|
106
|
+
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
107
|
+
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
108
|
+
const isCsHeight = !!customCellHeight;
|
|
109
|
+
const isRsHeight = resizeHeight > 0;
|
|
101
110
|
let isDirty;
|
|
102
111
|
const tdOns = {};
|
|
103
|
-
const rest = fullAllDataRowIdData[rowid];
|
|
104
112
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
113
|
+
const cellVerticalAlign = XEUtils.eqNull(verticalAlign) ? allVerticalAlign : verticalAlign;
|
|
105
114
|
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
106
115
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline');
|
|
107
|
-
const
|
|
108
|
-
const
|
|
116
|
+
const tdAttrs = { colid };
|
|
117
|
+
const cellParams = {
|
|
109
118
|
$table: $xeTable,
|
|
110
119
|
$grid: $xeTable.xegrid,
|
|
111
120
|
isEdit: false,
|
|
@@ -133,7 +142,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
133
142
|
isRowDragCell = rowDragOpts.trigger === 'row' || (column.dragSort && rowDragOpts.trigger === 'cell');
|
|
134
143
|
}
|
|
135
144
|
if (isRowDragCell) {
|
|
136
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(
|
|
145
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
137
146
|
}
|
|
138
147
|
// hover 进入事件
|
|
139
148
|
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
@@ -146,9 +155,9 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
146
155
|
}
|
|
147
156
|
else if (showTooltip || showAllTip) {
|
|
148
157
|
// 如果配置了显示 tooltip
|
|
149
|
-
$xeTable.triggerBodyTooltipEvent(evnt,
|
|
158
|
+
$xeTable.triggerBodyTooltipEvent(evnt, cellParams);
|
|
150
159
|
}
|
|
151
|
-
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget },
|
|
160
|
+
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
152
161
|
};
|
|
153
162
|
}
|
|
154
163
|
// hover 退出事件
|
|
@@ -160,13 +169,13 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
160
169
|
if (showTooltip || showAllTip) {
|
|
161
170
|
$xeTable.handleTargetLeaveEvent(evnt);
|
|
162
171
|
}
|
|
163
|
-
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget },
|
|
172
|
+
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
164
173
|
};
|
|
165
174
|
}
|
|
166
175
|
// 按下事件处理
|
|
167
176
|
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
168
177
|
tdOns.mousedown = (evnt) => {
|
|
169
|
-
$xeTable.triggerCellMousedownEvent(evnt,
|
|
178
|
+
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
170
179
|
};
|
|
171
180
|
}
|
|
172
181
|
// 拖拽列事件
|
|
@@ -175,11 +184,11 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
175
184
|
}
|
|
176
185
|
// 点击事件处理
|
|
177
186
|
tdOns.click = (evnt) => {
|
|
178
|
-
$xeTable.triggerCellClickEvent(evnt,
|
|
187
|
+
$xeTable.triggerCellClickEvent(evnt, cellParams);
|
|
179
188
|
};
|
|
180
189
|
// 双击事件处理
|
|
181
190
|
tdOns.dblclick = (evnt) => {
|
|
182
|
-
$xeTable.triggerCellDblclickEvent(evnt,
|
|
191
|
+
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
183
192
|
};
|
|
184
193
|
// 合并行或列
|
|
185
194
|
if (mergeList.length) {
|
|
@@ -190,29 +199,29 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
190
199
|
return null;
|
|
191
200
|
}
|
|
192
201
|
if (rowspan > 1) {
|
|
193
|
-
|
|
202
|
+
tdAttrs.rowspan = rowspan;
|
|
194
203
|
}
|
|
195
204
|
if (colspan > 1) {
|
|
196
|
-
|
|
205
|
+
tdAttrs.colspan = colspan;
|
|
197
206
|
}
|
|
198
207
|
}
|
|
199
208
|
}
|
|
200
209
|
else if (spanMethod) {
|
|
201
210
|
// 自定义合并行或列的方法
|
|
202
|
-
const { rowspan = 1, colspan = 1 } = spanMethod(
|
|
211
|
+
const { rowspan = 1, colspan = 1 } = spanMethod(cellParams) || {};
|
|
203
212
|
if (!rowspan || !colspan) {
|
|
204
213
|
return null;
|
|
205
214
|
}
|
|
206
215
|
if (rowspan > 1) {
|
|
207
|
-
|
|
216
|
+
tdAttrs.rowspan = rowspan;
|
|
208
217
|
}
|
|
209
218
|
if (colspan > 1) {
|
|
210
|
-
|
|
219
|
+
tdAttrs.colspan = colspan;
|
|
211
220
|
}
|
|
212
221
|
}
|
|
213
222
|
// 如果被合并不可隐藏
|
|
214
223
|
if (fixedHiddenColumn && mergeList) {
|
|
215
|
-
if (
|
|
224
|
+
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
216
225
|
fixedHiddenColumn = false;
|
|
217
226
|
}
|
|
218
227
|
}
|
|
@@ -220,39 +229,77 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
220
229
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
221
230
|
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
222
231
|
}
|
|
232
|
+
const isVNAutoHeight = scrollYLoad && !hasEllipsis;
|
|
233
|
+
let cellHeight = currCellHeight;
|
|
234
|
+
const vnHeight = calcCellHeightFlag ? rowRest.height : 0;
|
|
235
|
+
if (resizeHeight) {
|
|
236
|
+
cellHeight = resizeHeight;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
if (scrollYLoad) {
|
|
240
|
+
if (!hasEllipsis) {
|
|
241
|
+
cellHeight = vnHeight || currCellHeight;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const isLastColumn = $columnIndex === columns.length - 1;
|
|
246
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
247
|
+
let isVNPreEmptyStatus = false;
|
|
248
|
+
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
249
|
+
isVNPreEmptyStatus = true;
|
|
250
|
+
}
|
|
251
|
+
else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
252
|
+
isVNPreEmptyStatus = true;
|
|
253
|
+
}
|
|
254
|
+
const tcStyle = {};
|
|
255
|
+
if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
|
|
256
|
+
tcStyle.height = `${cellHeight}px`;
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
tcStyle.minHeight = `${cellHeight}px`;
|
|
260
|
+
}
|
|
223
261
|
const tdVNs = [];
|
|
224
|
-
if (fixedHiddenColumn &&
|
|
262
|
+
if (fixedHiddenColumn && isAllOverflow) {
|
|
225
263
|
tdVNs.push(h('div', {
|
|
264
|
+
key: 'tc',
|
|
226
265
|
class: ['vxe-cell', {
|
|
227
266
|
'c--title': showTitle,
|
|
228
267
|
'c--tooltip': showTooltip,
|
|
229
268
|
'c--ellipsis': showEllipsis
|
|
230
269
|
}],
|
|
231
|
-
style:
|
|
232
|
-
maxHeight: hasEllipsis && (customRHeight || defaultRowHeight) ? `${customRHeight || defaultRowHeight}px` : ''
|
|
233
|
-
}
|
|
270
|
+
style: tcStyle
|
|
234
271
|
}));
|
|
235
272
|
}
|
|
236
273
|
else {
|
|
237
274
|
// 渲染单元格
|
|
238
|
-
tdVNs.push(...renderLine(h, _vm,
|
|
275
|
+
tdVNs.push(...renderLine(h, _vm, cellParams, cellHeight), h('div', {
|
|
276
|
+
key: 'tc',
|
|
239
277
|
class: ['vxe-cell', {
|
|
240
278
|
'c--title': showTitle,
|
|
241
279
|
'c--tooltip': showTooltip,
|
|
242
280
|
'c--ellipsis': showEllipsis
|
|
243
281
|
}],
|
|
244
|
-
style:
|
|
245
|
-
maxHeight: hasEllipsis && (customRHeight || defaultRowHeight) ? `${customRHeight || defaultRowHeight}px` : ''
|
|
246
|
-
},
|
|
282
|
+
style: tcStyle,
|
|
247
283
|
attrs: {
|
|
248
284
|
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
249
285
|
}
|
|
250
|
-
},
|
|
286
|
+
}, isVNPreEmptyStatus
|
|
287
|
+
? []
|
|
288
|
+
: [
|
|
289
|
+
h('div', {
|
|
290
|
+
attrs: {
|
|
291
|
+
colid,
|
|
292
|
+
rowid
|
|
293
|
+
},
|
|
294
|
+
class: 'vxe-cell--wrapper'
|
|
295
|
+
}, column.renderCell(h, cellParams))
|
|
296
|
+
]));
|
|
251
297
|
if (showValidTip && errorValidItem) {
|
|
252
298
|
const errRule = errorValidItem.rule;
|
|
253
299
|
const validSlot = slots ? slots.valid : null;
|
|
254
|
-
const validParams = Object.assign(Object.assign(Object.assign({},
|
|
300
|
+
const validParams = Object.assign(Object.assign(Object.assign({}, cellParams), errorValidItem), { rule: errorValidItem });
|
|
255
301
|
tdVNs.push(h('div', {
|
|
302
|
+
key: 'tcv',
|
|
256
303
|
class: ['vxe-cell--valid-error-tip', getClass(validOpts.className, errorValidItem)],
|
|
257
304
|
style: errRule && errRule.maxWidth
|
|
258
305
|
? {
|
|
@@ -274,50 +321,54 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
274
321
|
]));
|
|
275
322
|
}
|
|
276
323
|
}
|
|
277
|
-
let
|
|
278
|
-
const vnHeight = isCalcCellHeight ? rest.height : 0;
|
|
279
|
-
if (hasEllipsis) {
|
|
280
|
-
if (customRHeight) {
|
|
281
|
-
cellHeight = `${customRHeight}px`;
|
|
282
|
-
}
|
|
283
|
-
else if (!isAllOverflow) {
|
|
284
|
-
cellHeight = `${vnHeight || defaultRowHeight || 18}px`;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
cellHeight = `${vnHeight || defaultRowHeight || 18}px`;
|
|
289
|
-
}
|
|
324
|
+
let showAreaRowStatus = false;
|
|
290
325
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
291
|
-
if ((
|
|
326
|
+
if ((!_columnIndex && selectCellToRow === true) ||
|
|
292
327
|
(selectCellToRow === column.field)) {
|
|
293
|
-
|
|
294
|
-
class: 'vxe-cell--area-status'
|
|
295
|
-
}));
|
|
328
|
+
showAreaRowStatus = true;
|
|
296
329
|
}
|
|
297
330
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
331
|
+
if (!fixedHiddenColumn && showResizable && isAllColumnDrag) {
|
|
332
|
+
tdVNs.push(h('div', {
|
|
333
|
+
key: 'tcc',
|
|
334
|
+
class: ['vxe-cell--col-resizable', {
|
|
335
|
+
'is--line': !border || border === 'none'
|
|
336
|
+
}],
|
|
337
|
+
on: {
|
|
338
|
+
mousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
339
|
+
dblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
340
|
+
}
|
|
341
|
+
}));
|
|
303
342
|
}
|
|
304
|
-
|
|
305
|
-
|
|
343
|
+
if ((rowResize || isAllRowDrag) && rowOpts.resizable) {
|
|
344
|
+
tdVNs.push(h('div', {
|
|
345
|
+
key: 'tcr',
|
|
346
|
+
class: 'vxe-cell--row-resizable',
|
|
347
|
+
on: {
|
|
348
|
+
mousedown: (evnt) => $xeTable.handleRowResizeMousedownEvent(evnt, cellParams),
|
|
349
|
+
dblclick: (evnt) => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
350
|
+
}
|
|
351
|
+
}));
|
|
306
352
|
}
|
|
307
353
|
return h('td', {
|
|
308
354
|
class: [
|
|
309
355
|
'vxe-body--column',
|
|
310
|
-
|
|
356
|
+
colid,
|
|
357
|
+
cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : '',
|
|
358
|
+
cellAlign ? `col--${cellAlign}` : '',
|
|
359
|
+
type ? `col--${type}` : '',
|
|
311
360
|
{
|
|
312
|
-
[`col--${cellAlign}`]: cellAlign,
|
|
313
|
-
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
314
|
-
[`col--${type}`]: type,
|
|
315
361
|
'col--last': isLastColumn,
|
|
316
362
|
'col--tree-node': treeNode,
|
|
317
363
|
'col--edit': isEdit,
|
|
318
364
|
'col--ellipsis': hasEllipsis,
|
|
365
|
+
'col--cs-height': isCsHeight,
|
|
366
|
+
'col--rs-height': isRsHeight,
|
|
367
|
+
'col--to-row': showAreaRowStatus,
|
|
368
|
+
'col--auto-height': isVNAutoHeight,
|
|
319
369
|
'fixed--width': !isAutoCellWidth,
|
|
320
370
|
'fixed--hidden': fixedHiddenColumn,
|
|
371
|
+
'is--padding': isCellPadding,
|
|
321
372
|
'is--drag-cell': isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
322
373
|
'is--drag-disabled': isDisabledDrag,
|
|
323
374
|
'col--dirty': isDirty,
|
|
@@ -325,25 +376,23 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
|
|
|
325
376
|
'col--valid-error': !!errorValidItem,
|
|
326
377
|
'col--current': currentColumn === column
|
|
327
378
|
},
|
|
328
|
-
getClass(compCellClassName,
|
|
329
|
-
getClass(className,
|
|
330
|
-
getClass(allCellClassName,
|
|
379
|
+
getClass(compCellClassName, cellParams),
|
|
380
|
+
getClass(className, cellParams),
|
|
381
|
+
getClass(allCellClassName, cellParams)
|
|
331
382
|
],
|
|
332
383
|
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
|
|
333
|
-
attrs,
|
|
334
|
-
style: Object.assign({
|
|
335
|
-
height: cellHeight
|
|
336
|
-
}, XEUtils.isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle),
|
|
384
|
+
attrs: tdAttrs,
|
|
385
|
+
style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle),
|
|
337
386
|
on: tdOns
|
|
338
|
-
},
|
|
387
|
+
}, isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
|
|
339
388
|
}
|
|
340
389
|
function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
341
390
|
const $xeTable = _vm.$parent;
|
|
342
391
|
const tableProps = $xeTable;
|
|
343
392
|
const tableReactData = $xeTable;
|
|
344
393
|
const tableInternalData = $xeTable;
|
|
345
|
-
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle,
|
|
346
|
-
const { hasFixedColumn, treeExpandedMaps, scrollXLoad, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData;
|
|
394
|
+
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
395
|
+
const { hasFixedColumn, treeExpandedMaps, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData;
|
|
347
396
|
const { fullAllDataRowIdData } = tableInternalData;
|
|
348
397
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
349
398
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
@@ -429,7 +478,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
429
478
|
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
430
479
|
return renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
431
480
|
});
|
|
432
|
-
rows.push(columnOpts.drag && columnDragOpts.animation
|
|
481
|
+
rows.push(!isColLoading && (columnOpts.drag && columnDragOpts.animation)
|
|
433
482
|
? h('transition-group', {
|
|
434
483
|
props: {
|
|
435
484
|
tag: 'tr',
|
|
@@ -464,7 +513,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
464
513
|
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`;
|
|
465
514
|
}
|
|
466
515
|
const { showOverflow } = expandColumn;
|
|
467
|
-
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ?
|
|
516
|
+
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow;
|
|
468
517
|
const expandParams = { $table: $xeTable, seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex };
|
|
469
518
|
rows.push(h('tr', {
|
|
470
519
|
class: ['vxe-body--expanded-row', {
|
|
@@ -555,8 +604,8 @@ export default {
|
|
|
555
604
|
const tableInternalData = $xeTable;
|
|
556
605
|
const { xID, $scopedSlots } = $xeTable;
|
|
557
606
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
558
|
-
const {
|
|
559
|
-
const { isGroup, tableData, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
607
|
+
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
608
|
+
const { isGroup, tableData, isRowLoading, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
560
609
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
561
610
|
const rowOpts = $xeTable.computeRowOpts;
|
|
562
611
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
@@ -568,7 +617,7 @@ export default {
|
|
|
568
617
|
let renderColumnList = tableColumn;
|
|
569
618
|
let isOptimizeMode = false;
|
|
570
619
|
// 如果是使用优化模式
|
|
571
|
-
if (scrollXLoad || scrollYLoad ||
|
|
620
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
572
621
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
573
622
|
// 如果不支持优化模式
|
|
574
623
|
}
|
|
@@ -698,9 +747,9 @@ export default {
|
|
|
698
747
|
});
|
|
699
748
|
})),
|
|
700
749
|
/**
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
rowOpts.drag && rowDragOpts.animation
|
|
750
|
+
* 内容
|
|
751
|
+
*/
|
|
752
|
+
!(isRowLoading || isColLoading) && (rowOpts.drag && rowDragOpts.animation)
|
|
704
753
|
? h('transition-group', {
|
|
705
754
|
ref: 'refBodyTBody',
|
|
706
755
|
props: {
|
|
@@ -746,6 +795,9 @@ export default {
|
|
|
746
795
|
}),
|
|
747
796
|
h('span', {
|
|
748
797
|
class: 'vxe-table--cell-active-area'
|
|
798
|
+
}),
|
|
799
|
+
h('span', {
|
|
800
|
+
class: 'vxe-table--cell-row-status-area'
|
|
749
801
|
})
|
|
750
802
|
])
|
|
751
803
|
: renderEmptyElement($xeTable),
|
package/es/table/src/cell.js
CHANGED
|
@@ -156,7 +156,7 @@ function renderTitleContent(h, params, content) {
|
|
|
156
156
|
const ons = {};
|
|
157
157
|
if (showTitle || showTooltip || showAllTip) {
|
|
158
158
|
ons.mouseenter = (evnt) => {
|
|
159
|
-
if (tableReactData.
|
|
159
|
+
if (tableReactData.isDragResize) {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
if (showTitle) {
|
|
@@ -169,7 +169,7 @@ function renderTitleContent(h, params, content) {
|
|
|
169
169
|
}
|
|
170
170
|
if (showTooltip || showAllTip) {
|
|
171
171
|
ons.mouseleave = (evnt) => {
|
|
172
|
-
if (tableReactData.
|
|
172
|
+
if (tableReactData.isDragResize) {
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
if (showTooltip || showAllTip) {
|
|
@@ -192,18 +192,6 @@ function renderTitleContent(h, params, content) {
|
|
|
192
192
|
}, getSlotVNs(content))
|
|
193
193
|
];
|
|
194
194
|
}
|
|
195
|
-
function formatFooterLabel(footerFormatter, params) {
|
|
196
|
-
if (XEUtils.isFunction(footerFormatter)) {
|
|
197
|
-
return `${footerFormatter(params)}`;
|
|
198
|
-
}
|
|
199
|
-
const isArr = XEUtils.isArray(footerFormatter);
|
|
200
|
-
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter);
|
|
201
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
202
|
-
if (footerFormatMethod) {
|
|
203
|
-
return `${isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)}`;
|
|
204
|
-
}
|
|
205
|
-
return '';
|
|
206
|
-
}
|
|
207
195
|
function getFooterContent(h, params) {
|
|
208
196
|
const { $table, column, _columnIndex, row, items } = params;
|
|
209
197
|
const { slots, editRender, cellRender, footerFormatter } = column;
|
|
@@ -211,40 +199,38 @@ function getFooterContent(h, params) {
|
|
|
211
199
|
if (slots && slots.footer) {
|
|
212
200
|
return $table.callSlot(slots.footer, params, h);
|
|
213
201
|
}
|
|
202
|
+
let itemValue = '';
|
|
203
|
+
// 兼容老模式
|
|
204
|
+
if (XEUtils.isArray(items)) {
|
|
205
|
+
itemValue = items[_columnIndex];
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
itemValue = XEUtils.get(row, column.field);
|
|
209
|
+
}
|
|
210
|
+
const footParams = Object.assign(params, {
|
|
211
|
+
itemValue
|
|
212
|
+
});
|
|
213
|
+
if (footerFormatter) {
|
|
214
|
+
if (XEUtils.isFunction(footerFormatter)) {
|
|
215
|
+
return `${footerFormatter(footParams)}`;
|
|
216
|
+
}
|
|
217
|
+
const isArr = XEUtils.isArray(footerFormatter);
|
|
218
|
+
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter);
|
|
219
|
+
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
220
|
+
if (footerFormatMethod) {
|
|
221
|
+
return `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`;
|
|
222
|
+
}
|
|
223
|
+
return '';
|
|
224
|
+
}
|
|
214
225
|
if (renderOpts) {
|
|
215
226
|
const compConf = renderer.get(renderOpts.name);
|
|
216
227
|
const rtFooter = compConf ? (compConf.renderTableFooter || compConf.renderFooter) : null;
|
|
217
228
|
if (rtFooter) {
|
|
218
|
-
return getSlotVNs(rtFooter.call($table, h, renderOpts,
|
|
229
|
+
return getSlotVNs(rtFooter.call($table, h, renderOpts, footParams));
|
|
219
230
|
}
|
|
220
231
|
}
|
|
221
|
-
let itemValue = '';
|
|
222
|
-
// 兼容老模式
|
|
223
|
-
if (XEUtils.isArray(items)) {
|
|
224
|
-
itemValue = items[_columnIndex];
|
|
225
|
-
return [
|
|
226
|
-
footerFormatter
|
|
227
|
-
? formatFooterLabel(footerFormatter, {
|
|
228
|
-
itemValue,
|
|
229
|
-
column,
|
|
230
|
-
row,
|
|
231
|
-
items,
|
|
232
|
-
_columnIndex
|
|
233
|
-
})
|
|
234
|
-
: formatText(itemValue, 1)
|
|
235
|
-
];
|
|
236
|
-
}
|
|
237
|
-
itemValue = XEUtils.get(row, column.field);
|
|
238
232
|
return [
|
|
239
|
-
|
|
240
|
-
? formatFooterLabel(footerFormatter, {
|
|
241
|
-
itemValue,
|
|
242
|
-
column,
|
|
243
|
-
row,
|
|
244
|
-
items,
|
|
245
|
-
_columnIndex
|
|
246
|
-
})
|
|
247
|
-
: formatText(itemValue, 1)
|
|
233
|
+
formatText(itemValue, 1)
|
|
248
234
|
];
|
|
249
235
|
}
|
|
250
236
|
function getDefaultCellLabel(params) {
|
|
@@ -386,11 +372,7 @@ export const Cell = {
|
|
|
386
372
|
return Cell.renderTreeIcon(h, params, Cell.renderDefaultCell.call(this, h, params));
|
|
387
373
|
},
|
|
388
374
|
renderDefaultFooter(h, params) {
|
|
389
|
-
return
|
|
390
|
-
h('span', {
|
|
391
|
-
class: 'vxe-cell--item'
|
|
392
|
-
}, getFooterContent(h, params))
|
|
393
|
-
];
|
|
375
|
+
return getFooterContent(h, params);
|
|
394
376
|
},
|
|
395
377
|
/**
|
|
396
378
|
* 树节点
|
|
@@ -834,7 +816,7 @@ export const Cell = {
|
|
|
834
816
|
renderSortIcon(h, params) {
|
|
835
817
|
const { $table, column } = params;
|
|
836
818
|
const sortOpts = $table.computeSortOpts;
|
|
837
|
-
const { showIcon, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
819
|
+
const { showIcon, allowBtn, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
838
820
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
839
821
|
return [
|
|
840
822
|
h('span', {
|
|
@@ -847,12 +829,14 @@ export const Cell = {
|
|
|
847
829
|
attrs: {
|
|
848
830
|
title: getI18n('vxe.table.sortAsc')
|
|
849
831
|
},
|
|
850
|
-
on:
|
|
851
|
-
|
|
852
|
-
evnt
|
|
853
|
-
|
|
832
|
+
on: allowBtn
|
|
833
|
+
? {
|
|
834
|
+
click(evnt) {
|
|
835
|
+
evnt.stopPropagation();
|
|
836
|
+
$table.triggerSortEvent(evnt, column, 'asc');
|
|
837
|
+
}
|
|
854
838
|
}
|
|
855
|
-
|
|
839
|
+
: undefined
|
|
856
840
|
}),
|
|
857
841
|
h('i', {
|
|
858
842
|
class: ['vxe-sort--desc-btn', iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
@@ -861,12 +845,14 @@ export const Cell = {
|
|
|
861
845
|
attrs: {
|
|
862
846
|
title: getI18n('vxe.table.sortDesc')
|
|
863
847
|
},
|
|
864
|
-
on:
|
|
865
|
-
|
|
866
|
-
evnt
|
|
867
|
-
|
|
848
|
+
on: allowBtn
|
|
849
|
+
? {
|
|
850
|
+
click(evnt) {
|
|
851
|
+
evnt.stopPropagation();
|
|
852
|
+
$table.triggerSortEvent(evnt, column, 'desc');
|
|
853
|
+
}
|
|
868
854
|
}
|
|
869
|
-
|
|
855
|
+
: undefined
|
|
870
856
|
})
|
|
871
857
|
])
|
|
872
858
|
];
|