vxe-table 4.2.8 → 4.3.0-beta.0
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/button/src/button.js +14 -14
- package/es/button/style.css +1 -58
- package/es/checkbox/src/checkbox.js +1 -1
- package/es/edit/src/hook.js +29 -13
- package/es/export/src/export-panel.js +1 -1
- package/es/export/src/hook.js +45 -45
- package/es/export/src/import-panel.js +2 -2
- package/es/export/src/util.js +7 -7
- package/es/filter/src/hook.js +5 -5
- package/es/filter/src/panel.js +1 -1
- package/es/footer/src/footer.js +15 -15
- package/es/form/src/form-config-item.js +8 -7
- package/es/form/src/form-item.js +8 -7
- package/es/form/src/form.js +8 -6
- package/es/form/style.css +0 -3
- package/es/grid/src/grid.js +18 -13
- package/es/grid/style.css +1 -1
- package/es/header/src/header.js +18 -18
- package/es/header/style.css +0 -95
- package/es/icon/style.css +371 -495
- package/es/input/src/input.js +26 -26
- package/es/input/style.css +13 -4
- package/es/keyboard/src/hook.js +7 -7
- package/es/list/src/list.js +5 -5
- package/es/loading/src/loading.js +1 -1
- package/es/menu/src/hooks.js +9 -9
- package/es/menu/src/panel.js +2 -2
- package/es/modal/src/modal.js +52 -51
- package/es/modal/style.css +2 -3
- package/es/pager/src/pager.js +3 -3
- package/es/pager/style.css +4 -2
- package/es/pulldown/src/pulldown.js +7 -7
- package/es/radio/src/button.js +1 -1
- package/es/radio/src/radio.js +1 -1
- package/es/select/src/select.js +13 -12
- package/es/select/style.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +1 -1
- package/es/table/src/body.js +38 -34
- package/es/table/src/cell.js +12 -8
- package/es/table/src/columnInfo.js +4 -4
- package/es/table/src/table.js +63 -58
- package/es/table/src/util.js +2 -2
- package/es/table/style.css +98 -0
- package/es/textarea/src/textarea.js +5 -5
- package/es/toolbar/src/toolbar.js +7 -6
- package/es/toolbar/style.css +1 -1
- package/es/tools/dom.js +2 -2
- package/es/tools/log.js +1 -1
- package/es/tools/vn.js +7 -0
- package/es/tooltip/src/tooltip.js +22 -10
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +38 -38
- package/es/v-x-e-table/src/interceptor.js +1 -1
- package/es/v-x-e-table/src/renderer.js +19 -15
- package/es/v-x-e-table/style.css +359 -459
- package/lib/button/src/button.js +10 -10
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +1 -58
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/checkbox.js +1 -1
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/edit/src/hook.js +14 -13
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/export-panel.js +1 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +50 -50
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +3 -3
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +4 -4
- package/lib/export/src/util.min.js +1 -1
- package/lib/filter/src/hook.js +5 -5
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +1 -1
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/footer/src/footer.js +14 -14
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form-config-item.js +9 -7
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -7
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +9 -6
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +0 -3
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/src/grid.js +17 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/src/header.js +17 -17
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/style/style.css +0 -95
- package/lib/header/style/style.min.css +0 -1
- package/lib/icon/style/style.css +371 -495
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +113 -88
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +23 -23
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +13 -4
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/src/hook.js +7 -7
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/list/src/list.js +5 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/hooks.js +9 -9
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +2 -2
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/modal/src/modal.js +55 -53
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -3
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +4 -2
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/src/pulldown.js +7 -7
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +1 -1
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +1 -1
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/select.js +14 -12
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +1 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +1 -1
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/body.js +36 -34
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +17 -11
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +4 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +63 -59
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +98 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +10 -8
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +1 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +2 -2
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/vn.js +13 -0
- package/lib/tools/vn.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +22 -8
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +38 -38
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +1 -1
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +18 -16
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +359 -459
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/package.json +5 -5
- package/packages/edit/src/hook.ts +18 -6
- package/packages/form/src/form-config-item.ts +4 -3
- package/packages/form/src/form-item.ts +4 -3
- package/packages/form/src/form.ts +6 -4
- package/packages/grid/src/grid.ts +2 -1
- package/packages/input/src/input.ts +3 -3
- package/packages/modal/src/modal.ts +5 -4
- package/packages/select/src/select.ts +2 -1
- package/packages/table/src/cell.ts +14 -10
- package/packages/table/src/table.ts +9 -8
- package/packages/toolbar/src/toolbar.ts +4 -3
- package/packages/tools/vn.ts +10 -0
- package/packages/tooltip/src/tooltip.ts +8 -4
- package/packages/v-x-e-table/src/conf.ts +38 -38
- package/styles/button.scss +1 -43
- package/styles/form.scss +0 -3
- package/styles/header.scss +0 -134
- package/styles/icon.scss +507 -713
- package/styles/input.scss +8 -0
- package/styles/modal.scss +0 -1
- package/styles/pager.scss +2 -0
- package/styles/select.scss +1 -0
- package/styles/table.scss +136 -0
- package/styles/variable.scss +1 -1
- package/types/all.d.ts +6 -0
- package/types/column.d.ts +11 -11
- package/types/component.d.ts +3 -1
- package/types/form-item.d.ts +1 -0
- package/types/form.d.ts +6 -2
- package/types/grid.d.ts +4 -4
- package/types/table.d.ts +2 -2
- package/types/v-x-e-table/renderer.d.ts +3 -2
package/es/switch/src/switch.js
CHANGED
|
@@ -103,7 +103,7 @@ export default defineComponent({
|
|
|
103
103
|
var offShowLabel = computeOffShowLabel.value;
|
|
104
104
|
return h('div', {
|
|
105
105
|
class: ['vxe-switch', isChecked ? 'is--on' : 'is--off', (_a = {},
|
|
106
|
-
_a["size--"
|
|
106
|
+
_a["size--".concat(vSize)] = vSize,
|
|
107
107
|
_a['is--disabled'] = disabled,
|
|
108
108
|
_a['is--animat'] = reactData.hasAnimat,
|
|
109
109
|
_a)]
|
package/es/table/src/body.js
CHANGED
|
@@ -9,10 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
-
for (var i = 0,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
16
20
|
};
|
|
17
21
|
import { createCommentVNode, defineComponent, h, ref, inject, nextTick, onBeforeUnmount, onMounted, onUnmounted } from 'vue';
|
|
18
22
|
import XEUtils from 'xe-utils';
|
|
@@ -111,8 +115,8 @@ export default defineComponent({
|
|
|
111
115
|
h('div', {
|
|
112
116
|
class: 'vxe-tree--line',
|
|
113
117
|
style: {
|
|
114
|
-
height: calcTreeLine(params, items, rIndex)
|
|
115
|
-
left: (rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize() : 0) + 16
|
|
118
|
+
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
119
|
+
left: "".concat((rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize() : 0) + 16, "px")
|
|
116
120
|
}
|
|
117
121
|
})
|
|
118
122
|
])
|
|
@@ -253,28 +257,28 @@ export default defineComponent({
|
|
|
253
257
|
'c--ellipsis': showEllipsis
|
|
254
258
|
}],
|
|
255
259
|
style: {
|
|
256
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? (scrollYRHeight || rowHeight
|
|
260
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
257
261
|
}
|
|
258
262
|
}));
|
|
259
263
|
}
|
|
260
264
|
else {
|
|
261
265
|
// 渲染单元格
|
|
262
|
-
tdVNs.push.apply(tdVNs, __spreadArray(__spreadArray([], renderLine(params)), [h('div', {
|
|
266
|
+
tdVNs.push.apply(tdVNs, __spreadArray(__spreadArray([], renderLine(params), false), [h('div', {
|
|
263
267
|
class: ['vxe-cell', {
|
|
264
268
|
'c--title': showTitle,
|
|
265
269
|
'c--tooltip': showTooltip,
|
|
266
270
|
'c--ellipsis': showEllipsis
|
|
267
271
|
}],
|
|
268
272
|
style: {
|
|
269
|
-
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? (scrollYRHeight || rowHeight
|
|
273
|
+
maxHeight: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
270
274
|
},
|
|
271
275
|
title: showTitle ? $xetable.getCellLabel(row, column) : null
|
|
272
|
-
}, column.renderCell(params))]));
|
|
276
|
+
}, column.renderCell(params))], false));
|
|
273
277
|
if (showValidTip && hasValidError) {
|
|
274
278
|
tdVNs.push(h('div', {
|
|
275
279
|
class: 'vxe-cell--valid',
|
|
276
280
|
style: validStore.rule && validStore.rule.maxWidth ? {
|
|
277
|
-
width: validStore.rule.maxWidth
|
|
281
|
+
width: "".concat(validStore.rule.maxWidth, "px")
|
|
278
282
|
} : null
|
|
279
283
|
}, [
|
|
280
284
|
h('span', {
|
|
@@ -287,8 +291,8 @@ export default defineComponent({
|
|
|
287
291
|
'vxe-body--column',
|
|
288
292
|
column.id,
|
|
289
293
|
(_a = {},
|
|
290
|
-
_a["col--"
|
|
291
|
-
_a["col--"
|
|
294
|
+
_a["col--".concat(cellAlign)] = cellAlign,
|
|
295
|
+
_a["col--".concat(type)] = type,
|
|
292
296
|
_a['col--last'] = $columnIndex === columns.length - 1,
|
|
293
297
|
_a['col--tree-node'] = treeNode,
|
|
294
298
|
_a['col--edit'] = isEdit,
|
|
@@ -303,7 +307,7 @@ export default defineComponent({
|
|
|
303
307
|
getPropClass(className, params),
|
|
304
308
|
getPropClass(allCellClassName, params)
|
|
305
309
|
], key: columnKey || columnOpts.useKey ? column.id : $columnIndex }, attrs), { style: Object.assign({
|
|
306
|
-
height: hasEllipsis && (scrollYRHeight || rowHeight) ? (scrollYRHeight || rowHeight
|
|
310
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
|
|
307
311
|
}, cellStyle ? (XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle) : null) }), tdOns), tdVNs);
|
|
308
312
|
};
|
|
309
313
|
var renderRows = function (fixedType, tableData, tableColumn) {
|
|
@@ -364,7 +368,7 @@ export default defineComponent({
|
|
|
364
368
|
}
|
|
365
369
|
rows.push(h('tr', __assign({ class: [
|
|
366
370
|
'vxe-body--row',
|
|
367
|
-
treeConfig ? "row--level-"
|
|
371
|
+
treeConfig ? "row--level-".concat(rowLevel) : '',
|
|
368
372
|
{
|
|
369
373
|
'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
370
374
|
'is--new': isNewRow,
|
|
@@ -383,13 +387,13 @@ export default defineComponent({
|
|
|
383
387
|
var cellStyle = void 0;
|
|
384
388
|
if (treeConfig) {
|
|
385
389
|
cellStyle = {
|
|
386
|
-
paddingLeft: (rowLevel * treeOpts.indent) + 30
|
|
390
|
+
paddingLeft: "".concat((rowLevel * treeOpts.indent) + 30, "px")
|
|
387
391
|
};
|
|
388
392
|
}
|
|
389
393
|
var showOverflow = expandColumn.showOverflow;
|
|
390
394
|
var hasEllipsis = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow;
|
|
391
395
|
var expandParams = { $table: $xetable, seq: seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row: row, rowIndex: rowIndex, $rowIndex: $rowIndex, _rowIndex: _rowIndex };
|
|
392
|
-
rows.push(h('tr', __assign({ class: 'vxe-body--expanded-row', key: "expand_"
|
|
396
|
+
rows.push(h('tr', __assign({ class: 'vxe-body--expanded-row', key: "expand_".concat(rowid), style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle) : null }, trOn), [
|
|
393
397
|
h('td', {
|
|
394
398
|
class: ['vxe-body--expanded-column', {
|
|
395
399
|
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
@@ -646,15 +650,15 @@ export default defineComponent({
|
|
|
646
650
|
nextTick(function () {
|
|
647
651
|
var fixedType = props.fixedType;
|
|
648
652
|
var elemStore = tableInternalData.elemStore;
|
|
649
|
-
var prefix = (fixedType || 'main'
|
|
653
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
650
654
|
var el = refElem.value;
|
|
651
|
-
elemStore[prefix
|
|
652
|
-
elemStore[prefix
|
|
653
|
-
elemStore[prefix
|
|
654
|
-
elemStore[prefix
|
|
655
|
-
elemStore[prefix
|
|
656
|
-
elemStore[prefix
|
|
657
|
-
elemStore[prefix
|
|
655
|
+
elemStore["".concat(prefix, "wrapper")] = refElem;
|
|
656
|
+
elemStore["".concat(prefix, "table")] = refBodyTable;
|
|
657
|
+
elemStore["".concat(prefix, "colgroup")] = refBodyColgroup;
|
|
658
|
+
elemStore["".concat(prefix, "list")] = refBodyTBody;
|
|
659
|
+
elemStore["".concat(prefix, "xSpace")] = refBodyXSpace;
|
|
660
|
+
elemStore["".concat(prefix, "ySpace")] = refBodyYSpace;
|
|
661
|
+
elemStore["".concat(prefix, "emptyBlock")] = refBodyEmptyBlock;
|
|
658
662
|
el.onscroll = scrollEvent;
|
|
659
663
|
el._onscroll = scrollEvent;
|
|
660
664
|
});
|
|
@@ -668,14 +672,14 @@ export default defineComponent({
|
|
|
668
672
|
onUnmounted(function () {
|
|
669
673
|
var fixedType = props.fixedType;
|
|
670
674
|
var elemStore = tableInternalData.elemStore;
|
|
671
|
-
var prefix = (fixedType || 'main'
|
|
672
|
-
elemStore[prefix
|
|
673
|
-
elemStore[prefix
|
|
674
|
-
elemStore[prefix
|
|
675
|
-
elemStore[prefix
|
|
676
|
-
elemStore[prefix
|
|
677
|
-
elemStore[prefix
|
|
678
|
-
elemStore[prefix
|
|
675
|
+
var prefix = "".concat(fixedType || 'main', "-body-");
|
|
676
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
677
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
678
|
+
elemStore["".concat(prefix, "colgroup")] = null;
|
|
679
|
+
elemStore["".concat(prefix, "list")] = null;
|
|
680
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
681
|
+
elemStore["".concat(prefix, "ySpace")] = null;
|
|
682
|
+
elemStore["".concat(prefix, "emptyBlock")] = null;
|
|
679
683
|
});
|
|
680
684
|
var renderVN = function () {
|
|
681
685
|
var fixedColumn = props.fixedColumn, fixedType = props.fixedType, tableColumn = props.tableColumn;
|
|
@@ -725,7 +729,7 @@ export default defineComponent({
|
|
|
725
729
|
emptyContent = tableProps.emptyText || GlobalConfig.i18n('vxe.table.emptyText');
|
|
726
730
|
}
|
|
727
731
|
}
|
|
728
|
-
return h('div', __assign({ ref: refElem, class: ['vxe-table--body-wrapper', fixedType ? "fixed-"
|
|
732
|
+
return h('div', __assign({ ref: refElem, class: ['vxe-table--body-wrapper', fixedType ? "fixed-".concat(fixedType, "--wrapper") : 'body--wrapper'], xid: xID }, (sYOpts.mode === 'wheel' ? { onWheel: wheelEvent } : {})), [
|
|
729
733
|
fixedType ? createCommentVNode() : h('div', {
|
|
730
734
|
ref: refBodyXSpace,
|
|
731
735
|
class: 'vxe-body--x-space'
|
package/es/table/src/cell.js
CHANGED
|
@@ -16,6 +16,7 @@ import { VXETable } from '../../v-x-e-table';
|
|
|
16
16
|
import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../tools/utils';
|
|
17
17
|
import { updateCellTitle } from '../../tools/dom';
|
|
18
18
|
import { createColumn } from './util';
|
|
19
|
+
import { getSlotVNs } from '../../tools/vn';
|
|
19
20
|
function renderHelpIcon(params) {
|
|
20
21
|
var $table = params.$table, column = params.column;
|
|
21
22
|
var titlePrefix = column.titlePrefix || column.titleHelp;
|
|
@@ -81,7 +82,7 @@ function getFooterContent(params) {
|
|
|
81
82
|
if (renderOpts) {
|
|
82
83
|
var compConf = VXETable.renderer.get(renderOpts.name);
|
|
83
84
|
if (compConf && compConf.renderFooter) {
|
|
84
|
-
return compConf.renderFooter(renderOpts, params);
|
|
85
|
+
return getSlotVNs(compConf.renderFooter(renderOpts, params));
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
return [formatText(items[_columnIndex], 1)];
|
|
@@ -163,10 +164,10 @@ export var Cell = {
|
|
|
163
164
|
if (renderOpts) {
|
|
164
165
|
var compConf = VXETable.renderer.get(renderOpts.name);
|
|
165
166
|
if (compConf && compConf.renderHeader) {
|
|
166
|
-
return renderTitleContent(params, compConf.renderHeader(renderOpts, params));
|
|
167
|
+
return renderTitleContent(params, getSlotVNs(compConf.renderHeader(renderOpts, params)));
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
return renderTitleContent(params, formatText(column.getTitle(), 1));
|
|
170
|
+
return renderTitleContent(params, [formatText(column.getTitle(), 1)]);
|
|
170
171
|
},
|
|
171
172
|
renderDefaultHeader: function (params) {
|
|
172
173
|
return renderHelpIcon(params).concat(Cell.renderHeaderTitle(params));
|
|
@@ -184,7 +185,7 @@ export var Cell = {
|
|
|
184
185
|
var compConf = VXETable.renderer.get(renderOpts.name);
|
|
185
186
|
var compFn = compConf ? compConf[funName] : null;
|
|
186
187
|
if (compFn) {
|
|
187
|
-
return compFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params));
|
|
188
|
+
return getSlotVNs(compFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params)));
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
var cellValue = $table.getCellLabel(row, column);
|
|
@@ -247,7 +248,7 @@ export var Cell = {
|
|
|
247
248
|
'is--active': isAceived
|
|
248
249
|
}],
|
|
249
250
|
style: {
|
|
250
|
-
paddingLeft: level * indent
|
|
251
|
+
paddingLeft: "".concat(level * indent, "px")
|
|
251
252
|
}
|
|
252
253
|
}, [
|
|
253
254
|
showIcon && ((rowChilds && rowChilds.length) || hasLazyChilds) ? [
|
|
@@ -270,7 +271,7 @@ export var Cell = {
|
|
|
270
271
|
var $table = params.$table, column = params.column;
|
|
271
272
|
var slots = column.slots;
|
|
272
273
|
var headerSlot = slots ? slots.header : null;
|
|
273
|
-
return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1));
|
|
274
|
+
return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : [formatText(column.getTitle(), 1)]);
|
|
274
275
|
},
|
|
275
276
|
renderSeqCell: function (params) {
|
|
276
277
|
var $table = params.$table, column = params.column;
|
|
@@ -591,7 +592,7 @@ export var Cell = {
|
|
|
591
592
|
if (contentRender) {
|
|
592
593
|
var compConf = VXETable.renderer.get(contentRender.name);
|
|
593
594
|
if (compConf && compConf.renderExpand) {
|
|
594
|
-
return compConf.renderExpand(contentRender, params);
|
|
595
|
+
return getSlotVNs(compConf.renderExpand(contentRender, params));
|
|
595
596
|
}
|
|
596
597
|
}
|
|
597
598
|
return [];
|
|
@@ -752,7 +753,10 @@ export var Cell = {
|
|
|
752
753
|
if (editSlot) {
|
|
753
754
|
return $table.callSlot(editSlot, params);
|
|
754
755
|
}
|
|
755
|
-
|
|
756
|
+
if (compConf && compConf.renderEdit) {
|
|
757
|
+
return getSlotVNs(compConf.renderEdit(editRender, Object.assign({ $type: 'edit' }, params)));
|
|
758
|
+
}
|
|
759
|
+
return [];
|
|
756
760
|
}
|
|
757
761
|
if (defaultSlot) {
|
|
758
762
|
return $table.callSlot(defaultSlot, params);
|
|
@@ -14,13 +14,13 @@ var ColumnInfo = /** @class */ (function () {
|
|
|
14
14
|
if (process.env.NODE_ENV === 'development') {
|
|
15
15
|
var types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
16
16
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
17
|
-
warnLog('vxe.error.errProp', ["type="
|
|
17
|
+
warnLog('vxe.error.errProp', ["type=".concat(_vm.type), types.join(', ')]);
|
|
18
18
|
}
|
|
19
19
|
if (XEUtils.isBoolean(_vm.cellRender) || (_vm.cellRender && !XEUtils.isObject(_vm.cellRender))) {
|
|
20
|
-
warnLog('vxe.error.errProp', ["column.cell-render="
|
|
20
|
+
warnLog('vxe.error.errProp', ["column.cell-render=".concat(_vm.cellRender), 'column.cell-render={}']);
|
|
21
21
|
}
|
|
22
22
|
if (XEUtils.isBoolean(_vm.editRender) || (_vm.editRender && !XEUtils.isObject(_vm.editRender))) {
|
|
23
|
-
warnLog('vxe.error.errProp', ["column.edit-render="
|
|
23
|
+
warnLog('vxe.error.errProp', ["column.edit-render=".concat(_vm.editRender), 'column.edit-render={}']);
|
|
24
24
|
}
|
|
25
25
|
if (_vm.cellRender && _vm.editRender) {
|
|
26
26
|
warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render']);
|
|
@@ -129,7 +129,7 @@ var ColumnInfo = /** @class */ (function () {
|
|
|
129
129
|
return getFuncText(this.title || (this.type === 'seq' ? GlobalConfig.i18n('vxe.table.seqTitle') : ''));
|
|
130
130
|
};
|
|
131
131
|
ColumnInfo.prototype.getKey = function () {
|
|
132
|
-
return this.field || (this.type ? "type="
|
|
132
|
+
return this.field || (this.type ? "type=".concat(this.type) : null);
|
|
133
133
|
};
|
|
134
134
|
ColumnInfo.prototype.update = function (name, value) {
|
|
135
135
|
// 不支持双向的属性
|