vxe-table 4.10.6-beta.9 → 4.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +1 -1
- 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/hook.js +7 -7
- package/es/table/module/export/hook.js +97 -62
- package/es/table/module/keyboard/hook.js +63 -27
- package/es/table/src/body.js +107 -85
- package/es/table/src/cell.js +41 -55
- package/es/table/src/column.js +13 -1
- package/es/table/src/columnInfo.js +3 -0
- package/es/table/src/emits.js +2 -0
- package/es/table/src/footer.js +45 -7
- package/es/table/src/header.js +67 -165
- package/es/table/src/props.js +14 -4
- package/es/table/src/table.js +858 -398
- package/es/table/src/util.js +77 -62
- package/es/table/style.css +246 -191
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +20 -7
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +246 -191
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1479 -875
- 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-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/hook.js +7 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +97 -57
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +71 -28
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/body.js +111 -81
- 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 +13 -1
- 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/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/footer.js +45 -5
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +51 -178
- package/lib/table/src/header.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 +911 -384
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +100 -82
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +246 -191
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +20 -7
- 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 +246 -191
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +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 +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/hook.ts +7 -7
- package/packages/table/module/export/hook.ts +118 -65
- package/packages/table/module/keyboard/hook.ts +59 -25
- package/packages/table/src/body.ts +126 -95
- package/packages/table/src/cell.ts +41 -63
- package/packages/table/src/column.ts +13 -1
- package/packages/table/src/columnInfo.ts +3 -0
- package/packages/table/src/emits.ts +5 -1
- package/packages/table/src/footer.ts +48 -8
- package/packages/table/src/header.ts +67 -165
- package/packages/table/src/props.ts +14 -5
- package/packages/table/src/table.ts +862 -398
- package/packages/table/src/util.ts +81 -62
- package/packages/ui/index.ts +19 -6
- package/styles/components/table.scss +313 -274
- 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 -1
- /package/es/{iconfont.1736854674495.ttf → iconfont.1739008158505.ttf} +0 -0
- /package/es/{iconfont.1736854674495.woff → iconfont.1739008158505.woff} +0 -0
- /package/es/{iconfont.1736854674495.woff2 → iconfont.1739008158505.woff2} +0 -0
- /package/lib/{iconfont.1736854674495.ttf → iconfont.1739008158505.ttf} +0 -0
- /package/lib/{iconfont.1736854674495.woff → iconfont.1739008158505.woff} +0 -0
- /package/lib/{iconfont.1736854674495.woff2 → iconfont.1739008158505.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -21,7 +21,7 @@ export default defineComponent({
|
|
|
21
21
|
setup(props) {
|
|
22
22
|
const $xeTable = inject('$xeTable', {});
|
|
23
23
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
24
|
-
const { computeEditOpts, computeMouseOpts, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeColumnDragOpts, computeLeftFixedWidth, computeRightFixedWidth } = $xeTable.getComputeMaps();
|
|
24
|
+
const { computeEditOpts, computeMouseOpts, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeColumnDragOpts, computeLeftFixedWidth, computeRightFixedWidth, computeResizableOpts } = $xeTable.getComputeMaps();
|
|
25
25
|
const refElem = ref();
|
|
26
26
|
const refBodyScroll = ref();
|
|
27
27
|
const refBodyTable = ref();
|
|
@@ -33,10 +33,10 @@ export default defineComponent({
|
|
|
33
33
|
// 滚动、拖动过程中不需要触发
|
|
34
34
|
const isVMScrollProcess = () => {
|
|
35
35
|
const { delayHover } = tableProps;
|
|
36
|
-
const { lastScrollTime,
|
|
37
|
-
return !!(
|
|
36
|
+
const { lastScrollTime, isDragResize } = tableReactData;
|
|
37
|
+
return !!(isDragResize || (lastScrollTime && Date.now() < lastScrollTime + delayHover));
|
|
38
38
|
};
|
|
39
|
-
const renderLine = (params) => {
|
|
39
|
+
const renderLine = (params, cellHeight) => {
|
|
40
40
|
const { row, column } = params;
|
|
41
41
|
const { afterFullData } = tableInternalData;
|
|
42
42
|
const { treeConfig } = tableProps;
|
|
@@ -58,12 +58,14 @@ export default defineComponent({
|
|
|
58
58
|
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
59
59
|
return [
|
|
60
60
|
h('div', {
|
|
61
|
+
key: 'tl',
|
|
61
62
|
class: 'vxe-tree--line-wrapper'
|
|
62
63
|
}, [
|
|
63
64
|
h('div', {
|
|
64
65
|
class: 'vxe-tree--line',
|
|
65
66
|
style: {
|
|
66
67
|
height: `${isFirstRow ? 1 : calcTreeLine(params, prevRow)}px`,
|
|
68
|
+
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
67
69
|
left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
|
|
68
70
|
}
|
|
69
71
|
})
|
|
@@ -77,26 +79,29 @@ export default defineComponent({
|
|
|
77
79
|
*/
|
|
78
80
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
79
81
|
const { fullAllDataRowIdData } = tableInternalData;
|
|
80
|
-
const { columnKey,
|
|
81
|
-
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad,
|
|
82
|
+
const { columnKey, resizable: allResizable, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
83
|
+
const { tableData, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
82
84
|
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData;
|
|
83
85
|
const cellOpts = computeCellOpts.value;
|
|
84
86
|
const validOpts = computeValidOpts.value;
|
|
85
87
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
86
88
|
const editOpts = computeEditOpts.value;
|
|
87
89
|
const tooltipOpts = computeTooltipOpts.value;
|
|
90
|
+
const resizableOpts = computeResizableOpts.value;
|
|
91
|
+
const { isAllColumnDrag, isAllRowDrag } = resizableOpts;
|
|
88
92
|
const rowOpts = computeRowOpts.value;
|
|
89
93
|
const rowDragOpts = computeRowDragOpts.value;
|
|
90
94
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
95
|
+
const customCellHeight = cellOpts.height || rowOpts.height;
|
|
91
96
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts;
|
|
92
97
|
const columnOpts = computeColumnOpts.value;
|
|
93
98
|
const mouseOpts = computeMouseOpts.value;
|
|
94
99
|
const areaOpts = computeAreaOpts.value;
|
|
95
100
|
const { selectCellToRow } = areaOpts;
|
|
96
|
-
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column;
|
|
97
|
-
const { verticalAlign } = cellOpts;
|
|
101
|
+
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
102
|
+
const { verticalAlign: allVerticalAlign } = cellOpts;
|
|
98
103
|
const { actived } = editStore;
|
|
99
|
-
const
|
|
104
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
100
105
|
const colid = column.id;
|
|
101
106
|
const renderOpts = editRender || cellRender;
|
|
102
107
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
@@ -106,21 +111,25 @@ export default defineComponent({
|
|
|
106
111
|
const columnIndex = $xeTable.getColumnIndex(column);
|
|
107
112
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
108
113
|
const isEdit = isEnableConf(editRender);
|
|
114
|
+
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
109
115
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
110
|
-
const
|
|
116
|
+
const isCellPadding = XEUtils.eqNull(padding) ? (allPadding === null ? cellOpts.padding : allPadding) : padding;
|
|
117
|
+
const cellOverflow = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
111
118
|
const showEllipsis = cellOverflow === 'ellipsis';
|
|
112
119
|
const showTitle = cellOverflow === 'title';
|
|
113
120
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
114
|
-
|
|
115
|
-
const
|
|
121
|
+
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
122
|
+
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
123
|
+
const isCsHeight = !!customCellHeight;
|
|
124
|
+
const isRsHeight = resizeHeight > 0;
|
|
116
125
|
let isDirty;
|
|
117
126
|
const tdOns = {};
|
|
118
|
-
const rest = fullAllDataRowIdData[rowid];
|
|
119
127
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
128
|
+
const cellVerticalAlign = XEUtils.eqNull(verticalAlign) ? allVerticalAlign : verticalAlign;
|
|
120
129
|
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
121
130
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline');
|
|
122
|
-
const
|
|
123
|
-
const
|
|
131
|
+
const tdAttrs = { colid };
|
|
132
|
+
const cellParams = {
|
|
124
133
|
$table: $xeTable,
|
|
125
134
|
$grid: $xeTable.xegrid,
|
|
126
135
|
isEdit: false,
|
|
@@ -148,7 +157,7 @@ export default defineComponent({
|
|
|
148
157
|
isRowDragCell = rowDragOpts.trigger === 'row' || (column.dragSort && rowDragOpts.trigger === 'cell');
|
|
149
158
|
}
|
|
150
159
|
if (isRowDragCell) {
|
|
151
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(
|
|
160
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
152
161
|
}
|
|
153
162
|
// hover 进入事件
|
|
154
163
|
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
@@ -161,9 +170,9 @@ export default defineComponent({
|
|
|
161
170
|
}
|
|
162
171
|
else if (showTooltip || showAllTip) {
|
|
163
172
|
// 如果配置了显示 tooltip
|
|
164
|
-
$xeTable.triggerBodyTooltipEvent(evnt,
|
|
173
|
+
$xeTable.triggerBodyTooltipEvent(evnt, cellParams);
|
|
165
174
|
}
|
|
166
|
-
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget },
|
|
175
|
+
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
167
176
|
};
|
|
168
177
|
}
|
|
169
178
|
// hover 退出事件
|
|
@@ -175,13 +184,13 @@ export default defineComponent({
|
|
|
175
184
|
if (showTooltip || showAllTip) {
|
|
176
185
|
$xeTable.handleTargetLeaveEvent(evnt);
|
|
177
186
|
}
|
|
178
|
-
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget },
|
|
187
|
+
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
179
188
|
};
|
|
180
189
|
}
|
|
181
190
|
// 按下事件处理
|
|
182
191
|
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
183
192
|
tdOns.onMousedown = (evnt) => {
|
|
184
|
-
$xeTable.triggerCellMousedownEvent(evnt,
|
|
193
|
+
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
196
|
// 拖拽列事件
|
|
@@ -190,11 +199,11 @@ export default defineComponent({
|
|
|
190
199
|
}
|
|
191
200
|
// 点击事件处理
|
|
192
201
|
tdOns.onClick = (evnt) => {
|
|
193
|
-
$xeTable.triggerCellClickEvent(evnt,
|
|
202
|
+
$xeTable.triggerCellClickEvent(evnt, cellParams);
|
|
194
203
|
};
|
|
195
204
|
// 双击事件处理
|
|
196
205
|
tdOns.onDblclick = (evnt) => {
|
|
197
|
-
$xeTable.triggerCellDblclickEvent(evnt,
|
|
206
|
+
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
198
207
|
};
|
|
199
208
|
// 合并行或列
|
|
200
209
|
if (mergeList.length) {
|
|
@@ -205,29 +214,29 @@ export default defineComponent({
|
|
|
205
214
|
return null;
|
|
206
215
|
}
|
|
207
216
|
if (rowspan > 1) {
|
|
208
|
-
|
|
217
|
+
tdAttrs.rowspan = rowspan;
|
|
209
218
|
}
|
|
210
219
|
if (colspan > 1) {
|
|
211
|
-
|
|
220
|
+
tdAttrs.colspan = colspan;
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
223
|
}
|
|
215
224
|
else if (spanMethod) {
|
|
216
225
|
// 自定义合并行或列的方法
|
|
217
|
-
const { rowspan = 1, colspan = 1 } = spanMethod(
|
|
226
|
+
const { rowspan = 1, colspan = 1 } = spanMethod(cellParams) || {};
|
|
218
227
|
if (!rowspan || !colspan) {
|
|
219
228
|
return null;
|
|
220
229
|
}
|
|
221
230
|
if (rowspan > 1) {
|
|
222
|
-
|
|
231
|
+
tdAttrs.rowspan = rowspan;
|
|
223
232
|
}
|
|
224
233
|
if (colspan > 1) {
|
|
225
|
-
|
|
234
|
+
tdAttrs.colspan = colspan;
|
|
226
235
|
}
|
|
227
236
|
}
|
|
228
237
|
// 如果被合并不可隐藏
|
|
229
238
|
if (fixedHiddenColumn && mergeList) {
|
|
230
|
-
if (
|
|
239
|
+
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
231
240
|
fixedHiddenColumn = false;
|
|
232
241
|
}
|
|
233
242
|
}
|
|
@@ -236,31 +245,27 @@ export default defineComponent({
|
|
|
236
245
|
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
237
246
|
}
|
|
238
247
|
const isVNAutoHeight = scrollYLoad && !hasEllipsis;
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
else if (!isAllOverflow) {
|
|
246
|
-
cellHeight = vnHeight || defaultRowHeight || 18;
|
|
247
|
-
}
|
|
248
|
+
const cellHeight = calcCellHeightFlag ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight) : defaultRowHeight;
|
|
249
|
+
const isLastColumn = $columnIndex === columns.length - 1;
|
|
250
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
251
|
+
let isVNPreEmptyStatus = false;
|
|
252
|
+
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
253
|
+
isVNPreEmptyStatus = true;
|
|
248
254
|
}
|
|
249
|
-
else {
|
|
250
|
-
|
|
255
|
+
else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
256
|
+
isVNPreEmptyStatus = true;
|
|
251
257
|
}
|
|
252
258
|
const tcStyle = {};
|
|
253
|
-
if (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
tcStyle.height = `${cellHeight}px`;
|
|
259
|
-
}
|
|
259
|
+
if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
|
|
260
|
+
tcStyle.height = `${cellHeight}px`;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
tcStyle.minHeight = `${cellHeight}px`;
|
|
260
264
|
}
|
|
261
265
|
const tdVNs = [];
|
|
262
|
-
if (fixedHiddenColumn &&
|
|
266
|
+
if (fixedHiddenColumn && isAllOverflow) {
|
|
263
267
|
tdVNs.push(h('div', {
|
|
268
|
+
key: 'tc',
|
|
264
269
|
class: ['vxe-cell', {
|
|
265
270
|
'c--title': showTitle,
|
|
266
271
|
'c--tooltip': showTooltip,
|
|
@@ -271,7 +276,8 @@ export default defineComponent({
|
|
|
271
276
|
}
|
|
272
277
|
else {
|
|
273
278
|
// 渲染单元格
|
|
274
|
-
tdVNs.push(...renderLine(
|
|
279
|
+
tdVNs.push(...renderLine(cellParams, cellHeight), h('div', {
|
|
280
|
+
key: 'tc',
|
|
275
281
|
class: ['vxe-cell', {
|
|
276
282
|
'c--title': showTitle,
|
|
277
283
|
'c--tooltip': showTooltip,
|
|
@@ -279,18 +285,21 @@ export default defineComponent({
|
|
|
279
285
|
}],
|
|
280
286
|
style: tcStyle,
|
|
281
287
|
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
282
|
-
},
|
|
283
|
-
? [
|
|
288
|
+
}, isVNPreEmptyStatus
|
|
289
|
+
? []
|
|
290
|
+
: [
|
|
284
291
|
h('div', {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
colid,
|
|
293
|
+
rowid,
|
|
294
|
+
class: 'vxe-cell--wrapper'
|
|
295
|
+
}, column.renderCell(cellParams))
|
|
296
|
+
]));
|
|
289
297
|
if (showValidTip && errorValidItem) {
|
|
290
298
|
const errRule = errorValidItem.rule;
|
|
291
299
|
const validSlot = slots ? slots.valid : null;
|
|
292
|
-
const validParams = Object.assign(Object.assign(Object.assign({},
|
|
300
|
+
const validParams = Object.assign(Object.assign(Object.assign({}, cellParams), errorValidItem), { rule: errorValidItem });
|
|
293
301
|
tdVNs.push(h('div', {
|
|
302
|
+
key: 'tcv',
|
|
294
303
|
class: ['vxe-cell--valid-error-tip', getPropClass(validOpts.className, validParams)],
|
|
295
304
|
style: errRule && errRule.maxWidth
|
|
296
305
|
? {
|
|
@@ -312,37 +321,49 @@ export default defineComponent({
|
|
|
312
321
|
]));
|
|
313
322
|
}
|
|
314
323
|
}
|
|
324
|
+
let showAreaRowStatus = false;
|
|
315
325
|
if (mouseConfig && mouseOpts.area && selectCellToRow) {
|
|
316
|
-
if ((
|
|
326
|
+
if ((!_columnIndex && selectCellToRow === true) ||
|
|
317
327
|
(selectCellToRow === column.field)) {
|
|
318
|
-
|
|
319
|
-
class: 'vxe-cell--area-status'
|
|
320
|
-
}));
|
|
328
|
+
showAreaRowStatus = true;
|
|
321
329
|
}
|
|
322
330
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
+
onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
338
|
+
onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
339
|
+
}));
|
|
328
340
|
}
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
if ((rowResize || isAllRowDrag) && rowOpts.resizable) {
|
|
342
|
+
tdVNs.push(h('div', {
|
|
343
|
+
key: 'tcr',
|
|
344
|
+
class: 'vxe-cell--row-resizable',
|
|
345
|
+
onMousedown: (evnt) => $xeTable.handleRowResizeMousedownEvent(evnt, cellParams),
|
|
346
|
+
onDblclick: (evnt) => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
347
|
+
}));
|
|
331
348
|
}
|
|
332
349
|
return h('td', Object.assign(Object.assign(Object.assign({ class: [
|
|
333
350
|
'vxe-body--column',
|
|
334
351
|
colid,
|
|
352
|
+
cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : '',
|
|
353
|
+
cellAlign ? `col--${cellAlign}` : '',
|
|
354
|
+
type ? `col--${type}` : '',
|
|
335
355
|
{
|
|
336
|
-
[`col--${cellAlign}`]: cellAlign,
|
|
337
|
-
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
338
|
-
[`col--${type}`]: type,
|
|
339
356
|
'col--last': isLastColumn,
|
|
340
357
|
'col--tree-node': treeNode,
|
|
341
358
|
'col--edit': isEdit,
|
|
342
359
|
'col--ellipsis': hasEllipsis,
|
|
360
|
+
'col--cs-height': isCsHeight,
|
|
361
|
+
'col--rs-height': isRsHeight,
|
|
362
|
+
'col--to-row': showAreaRowStatus,
|
|
343
363
|
'col--auto-height': isVNAutoHeight,
|
|
344
364
|
'fixed--width': !isAutoCellWidth,
|
|
345
365
|
'fixed--hidden': fixedHiddenColumn,
|
|
366
|
+
'is--padding': isCellPadding,
|
|
346
367
|
'is--drag-cell': isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
347
368
|
'is--drag-disabled': isDisabledDrag,
|
|
348
369
|
'col--dirty': isDirty,
|
|
@@ -350,16 +371,14 @@ export default defineComponent({
|
|
|
350
371
|
'col--valid-error': !!errorValidItem,
|
|
351
372
|
'col--current': currentColumn === column
|
|
352
373
|
},
|
|
353
|
-
getPropClass(compCellClassName,
|
|
354
|
-
getPropClass(className,
|
|
355
|
-
getPropClass(allCellClassName,
|
|
356
|
-
], key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex },
|
|
357
|
-
height: cellHeight ? `${cellHeight}px` : ''
|
|
358
|
-
}, XEUtils.isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle) }), tdOns), isVNPreEmptyStatus || (isOptimizeMode && fixedHiddenColumn) ? [] : tdVNs);
|
|
374
|
+
getPropClass(compCellClassName, cellParams),
|
|
375
|
+
getPropClass(className, cellParams),
|
|
376
|
+
getPropClass(allCellClassName, cellParams)
|
|
377
|
+
], key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex }, tdAttrs), { style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle) }), tdOns), isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
|
|
359
378
|
};
|
|
360
379
|
const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
|
|
361
|
-
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle,
|
|
362
|
-
const { hasFixedColumn, treeExpandedMaps, scrollXLoad, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData;
|
|
380
|
+
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
381
|
+
const { hasFixedColumn, treeExpandedMaps, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData;
|
|
363
382
|
const { fullAllDataRowIdData } = tableInternalData;
|
|
364
383
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
365
384
|
const radioOpts = computeRadioOpts.value;
|
|
@@ -444,7 +463,7 @@ export default defineComponent({
|
|
|
444
463
|
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
445
464
|
return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
446
465
|
});
|
|
447
|
-
rows.push(columnOpts.drag && columnDragOpts.animation
|
|
466
|
+
rows.push(!isColLoading && (columnOpts.drag && columnDragOpts.animation)
|
|
448
467
|
? h(TransitionGroup, Object.assign({ name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex }, trOn), {
|
|
449
468
|
default: () => tdVNs
|
|
450
469
|
})
|
|
@@ -461,7 +480,7 @@ export default defineComponent({
|
|
|
461
480
|
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`;
|
|
462
481
|
}
|
|
463
482
|
const { showOverflow } = expandColumn;
|
|
464
|
-
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ?
|
|
483
|
+
const hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? isAllOverflow : showOverflow;
|
|
465
484
|
const expandParams = { $table: $xeTable, seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex };
|
|
466
485
|
rows.push(h('tr', Object.assign({ class: ['vxe-body--expanded-row', {
|
|
467
486
|
'is--padding': padding
|
|
@@ -524,8 +543,8 @@ export default defineComponent({
|
|
|
524
543
|
const renderVN = () => {
|
|
525
544
|
const { slots } = tableContext;
|
|
526
545
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
527
|
-
const {
|
|
528
|
-
const { isGroup, tableData, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
546
|
+
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
547
|
+
const { isGroup, tableData, isRowLoading, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
529
548
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
530
549
|
const rowOpts = computeRowOpts.value;
|
|
531
550
|
const emptyOpts = computeEmptyOpts.value;
|
|
@@ -537,7 +556,7 @@ export default defineComponent({
|
|
|
537
556
|
let renderColumnList = tableColumn;
|
|
538
557
|
let isOptimizeMode = false;
|
|
539
558
|
// 如果是使用优化模式
|
|
540
|
-
if (scrollXLoad || scrollYLoad ||
|
|
559
|
+
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
541
560
|
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
542
561
|
// 如果不支持优化模式
|
|
543
562
|
}
|
|
@@ -658,9 +677,9 @@ export default defineComponent({
|
|
|
658
677
|
});
|
|
659
678
|
})),
|
|
660
679
|
/**
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
rowOpts.drag && rowDragOpts.animation
|
|
680
|
+
* 内容
|
|
681
|
+
*/
|
|
682
|
+
!(isRowLoading || isColLoading) && (rowOpts.drag && rowDragOpts.animation)
|
|
664
683
|
? h(TransitionGroup, {
|
|
665
684
|
ref: refBodyTBody,
|
|
666
685
|
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`,
|
|
@@ -704,6 +723,9 @@ export default defineComponent({
|
|
|
704
723
|
}),
|
|
705
724
|
h('span', {
|
|
706
725
|
class: 'vxe-table--cell-active-area'
|
|
726
|
+
}),
|
|
727
|
+
h('span', {
|
|
728
|
+
class: 'vxe-table--cell-row-status-area'
|
|
707
729
|
})
|
|
708
730
|
])
|
|
709
731
|
: renderEmptyElement($xeTable),
|
package/es/table/src/cell.js
CHANGED
|
@@ -152,7 +152,7 @@ function renderTitleContent(params, content) {
|
|
|
152
152
|
const ons = {};
|
|
153
153
|
if (showTitle || showTooltip || showAllTip) {
|
|
154
154
|
ons.onMouseenter = (evnt) => {
|
|
155
|
-
if (tableReactData.
|
|
155
|
+
if (tableReactData.isDragResize) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
if (showTitle) {
|
|
@@ -165,7 +165,7 @@ function renderTitleContent(params, content) {
|
|
|
165
165
|
}
|
|
166
166
|
if (showTooltip || showAllTip) {
|
|
167
167
|
ons.onMouseleave = (evnt) => {
|
|
168
|
-
if (tableReactData.
|
|
168
|
+
if (tableReactData.isDragResize) {
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
if (showTooltip || showAllTip) {
|
|
@@ -179,18 +179,6 @@ function renderTitleContent(params, content) {
|
|
|
179
179
|
: h('span', Object.assign({ class: 'vxe-cell--title' }, ons), getSlotVNs(content))
|
|
180
180
|
];
|
|
181
181
|
}
|
|
182
|
-
function formatFooterLabel(footerFormatter, params) {
|
|
183
|
-
if (XEUtils.isFunction(footerFormatter)) {
|
|
184
|
-
return `${footerFormatter(params)}`;
|
|
185
|
-
}
|
|
186
|
-
const isArr = XEUtils.isArray(footerFormatter);
|
|
187
|
-
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter);
|
|
188
|
-
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
189
|
-
if (footerFormatMethod) {
|
|
190
|
-
return `${isArr ? footerFormatMethod(params, ...footerFormatter.slice(1)) : footerFormatMethod(params)}`;
|
|
191
|
-
}
|
|
192
|
-
return '';
|
|
193
|
-
}
|
|
194
182
|
function getFooterContent(params) {
|
|
195
183
|
const { $table, column, _columnIndex, items, row } = params;
|
|
196
184
|
const { slots, editRender, cellRender, footerFormatter } = column;
|
|
@@ -199,42 +187,40 @@ function getFooterContent(params) {
|
|
|
199
187
|
if (footerSlot) {
|
|
200
188
|
return $table.callSlot(footerSlot, params);
|
|
201
189
|
}
|
|
190
|
+
let itemValue = '';
|
|
191
|
+
// 兼容老模式
|
|
192
|
+
if (XEUtils.isArray(items)) {
|
|
193
|
+
itemValue = items[_columnIndex];
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
itemValue = XEUtils.get(row, column.field);
|
|
197
|
+
}
|
|
198
|
+
const footParams = Object.assign(params, {
|
|
199
|
+
itemValue
|
|
200
|
+
});
|
|
201
|
+
if (footerFormatter) {
|
|
202
|
+
if (XEUtils.isFunction(footerFormatter)) {
|
|
203
|
+
return `${footerFormatter(footParams)}`;
|
|
204
|
+
}
|
|
205
|
+
const isArr = XEUtils.isArray(footerFormatter);
|
|
206
|
+
const gFormatOpts = isArr ? formats.get(footerFormatter[0]) : formats.get(footerFormatter);
|
|
207
|
+
const footerFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
208
|
+
if (footerFormatMethod) {
|
|
209
|
+
return `${isArr ? footerFormatMethod(footParams, ...footerFormatter.slice(1)) : footerFormatMethod(footParams)}`;
|
|
210
|
+
}
|
|
211
|
+
return '';
|
|
212
|
+
}
|
|
202
213
|
if (renderOpts) {
|
|
203
214
|
const compConf = renderer.get(renderOpts.name);
|
|
204
215
|
if (compConf) {
|
|
205
216
|
const rtFooter = compConf.renderTableFooter || compConf.renderFooter;
|
|
206
217
|
if (rtFooter) {
|
|
207
|
-
return getSlotVNs(rtFooter(renderOpts,
|
|
218
|
+
return getSlotVNs(rtFooter(renderOpts, footParams));
|
|
208
219
|
}
|
|
209
220
|
}
|
|
210
221
|
}
|
|
211
|
-
let itemValue = '';
|
|
212
|
-
// 兼容老模式
|
|
213
|
-
if (XEUtils.isArray(items)) {
|
|
214
|
-
itemValue = items[_columnIndex];
|
|
215
|
-
return [
|
|
216
|
-
footerFormatter
|
|
217
|
-
? formatFooterLabel(footerFormatter, {
|
|
218
|
-
itemValue,
|
|
219
|
-
column,
|
|
220
|
-
row,
|
|
221
|
-
items,
|
|
222
|
-
_columnIndex
|
|
223
|
-
})
|
|
224
|
-
: formatText(itemValue, 1)
|
|
225
|
-
];
|
|
226
|
-
}
|
|
227
|
-
itemValue = XEUtils.get(row, column.field);
|
|
228
222
|
return [
|
|
229
|
-
|
|
230
|
-
? formatFooterLabel(footerFormatter, {
|
|
231
|
-
itemValue,
|
|
232
|
-
column,
|
|
233
|
-
row,
|
|
234
|
-
items,
|
|
235
|
-
_columnIndex
|
|
236
|
-
})
|
|
237
|
-
: formatText(itemValue, 1)
|
|
223
|
+
formatText(itemValue, 1)
|
|
238
224
|
];
|
|
239
225
|
}
|
|
240
226
|
function getDefaultCellLabel(params) {
|
|
@@ -383,11 +369,7 @@ export const Cell = {
|
|
|
383
369
|
return Cell.renderTreeIcon(params, Cell.renderDefaultCell(params));
|
|
384
370
|
},
|
|
385
371
|
renderDefaultFooter(params) {
|
|
386
|
-
return
|
|
387
|
-
h('span', {
|
|
388
|
-
class: 'vxe-cell--item'
|
|
389
|
-
}, getFooterContent(params))
|
|
390
|
-
];
|
|
372
|
+
return getFooterContent(params);
|
|
391
373
|
},
|
|
392
374
|
/**
|
|
393
375
|
* 树节点
|
|
@@ -823,7 +805,7 @@ export const Cell = {
|
|
|
823
805
|
const { $table, column } = params;
|
|
824
806
|
const { computeSortOpts } = $table.getComputeMaps();
|
|
825
807
|
const sortOpts = computeSortOpts.value;
|
|
826
|
-
const { showIcon, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
808
|
+
const { showIcon, allowBtn, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
827
809
|
const { order } = column;
|
|
828
810
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
829
811
|
return [
|
|
@@ -835,20 +817,24 @@ export const Cell = {
|
|
|
835
817
|
'sort--active': order === 'asc'
|
|
836
818
|
}],
|
|
837
819
|
title: getI18n('vxe.table.sortAsc'),
|
|
838
|
-
onClick
|
|
839
|
-
evnt
|
|
840
|
-
|
|
841
|
-
|
|
820
|
+
onClick: allowBtn
|
|
821
|
+
? (evnt) => {
|
|
822
|
+
evnt.stopPropagation();
|
|
823
|
+
$table.triggerSortEvent(evnt, column, 'asc');
|
|
824
|
+
}
|
|
825
|
+
: undefined
|
|
842
826
|
}),
|
|
843
827
|
h('i', {
|
|
844
828
|
class: ['vxe-sort--desc-btn', iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
845
829
|
'sort--active': order === 'desc'
|
|
846
830
|
}],
|
|
847
831
|
title: getI18n('vxe.table.sortDesc'),
|
|
848
|
-
onClick
|
|
849
|
-
evnt
|
|
850
|
-
|
|
851
|
-
|
|
832
|
+
onClick: allowBtn
|
|
833
|
+
? (evnt) => {
|
|
834
|
+
evnt.stopPropagation();
|
|
835
|
+
$table.triggerSortEvent(evnt, column, 'desc');
|
|
836
|
+
}
|
|
837
|
+
: undefined
|
|
852
838
|
})
|
|
853
839
|
])
|
|
854
840
|
];
|
package/es/table/src/column.js
CHANGED
|
@@ -54,6 +54,16 @@ export const columnProps = {
|
|
|
54
54
|
formatter: [Function, Array, String],
|
|
55
55
|
// 格式化表尾显示内容
|
|
56
56
|
footerFormatter: [Function, Array, String],
|
|
57
|
+
// 是否显示间距
|
|
58
|
+
padding: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
// 垂直对齐方式
|
|
63
|
+
verticalAlign: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
57
67
|
// 是否允许排序
|
|
58
68
|
sortable: Boolean,
|
|
59
69
|
// 自定义排序的属性
|
|
@@ -80,8 +90,10 @@ export const columnProps = {
|
|
|
80
90
|
filterRender: Object,
|
|
81
91
|
// 设置为树节点
|
|
82
92
|
treeNode: Boolean,
|
|
83
|
-
//
|
|
93
|
+
// 设置为拖拽排序
|
|
84
94
|
dragSort: Boolean,
|
|
95
|
+
// 设置为行高拖拽
|
|
96
|
+
rowResize: Boolean,
|
|
85
97
|
// 是否可视
|
|
86
98
|
visible: {
|
|
87
99
|
type: Boolean,
|
|
@@ -70,6 +70,8 @@ export class ColumnInfo {
|
|
|
70
70
|
footerClassName: _vm.footerClassName,
|
|
71
71
|
formatter: formatter,
|
|
72
72
|
footerFormatter: _vm.footerFormatter,
|
|
73
|
+
padding: _vm.padding,
|
|
74
|
+
verticalAlign: _vm.verticalAlign,
|
|
73
75
|
sortable: _vm.sortable,
|
|
74
76
|
sortBy: _vm.sortBy,
|
|
75
77
|
sortType: _vm.sortType,
|
|
@@ -81,6 +83,7 @@ export class ColumnInfo {
|
|
|
81
83
|
filterRender: _vm.filterRender,
|
|
82
84
|
treeNode: _vm.treeNode,
|
|
83
85
|
dragSort: _vm.dragSort,
|
|
86
|
+
rowResize: _vm.rowResize,
|
|
84
87
|
cellType: _vm.cellType,
|
|
85
88
|
cellRender: _vm.cellRender,
|
|
86
89
|
editRender: _vm.editRender,
|