vxe-table 4.21.8 → 4.21.9
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/dist/all.esm.js +47 -13
- package/dist/style.css +1 -1
- package/es/style.css +1 -1
- package/es/table/src/cell.js +39 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +39 -5
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +37 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/src/cell.ts +51 -5
- /package/es/{iconfont.1788921188086.ttf → iconfont.1788956877759.ttf} +0 -0
- /package/es/{iconfont.1788921188086.woff → iconfont.1788956877759.woff} +0 -0
- /package/es/{iconfont.1788921188086.woff2 → iconfont.1788956877759.woff2} +0 -0
- /package/lib/{iconfont.1788921188086.ttf → iconfont.1788956877759.ttf} +0 -0
- /package/lib/{iconfont.1788921188086.woff → iconfont.1788956877759.woff} +0 -0
- /package/lib/{iconfont.1788921188086.woff2 → iconfont.1788956877759.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
|
|
|
5
5
|
import { updateCellTitle } from '../../ui/src/dom';
|
|
6
6
|
import { createColumn, getRowid } from './util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
|
-
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
8
|
+
const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
9
9
|
function renderTitlePrefixIcon(params) {
|
|
10
10
|
const { $table, column } = params;
|
|
11
11
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
@@ -280,9 +280,12 @@ function renderHeaderHandle(params) {
|
|
|
280
280
|
const tableProps = $table.props;
|
|
281
281
|
const { editConfig } = tableProps;
|
|
282
282
|
const { type, filters, sortable, editRender, slots } = column;
|
|
283
|
-
|
|
284
|
-
if (
|
|
285
|
-
|
|
283
|
+
// 兼容已废弃方式
|
|
284
|
+
if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
285
|
+
const headerSlot = slots ? slots.header : null;
|
|
286
|
+
if (headerSlot) {
|
|
287
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
288
|
+
}
|
|
286
289
|
}
|
|
287
290
|
switch (type) {
|
|
288
291
|
case 'seq':
|
|
@@ -342,11 +345,18 @@ export const Cell = {
|
|
|
342
345
|
const { $table, column } = params;
|
|
343
346
|
const tableProps = $table.props;
|
|
344
347
|
const { editConfig } = tableProps;
|
|
345
|
-
const { editRender, cellRender } = column;
|
|
348
|
+
const { slots, editRender, cellRender } = column;
|
|
346
349
|
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
347
350
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
348
351
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
349
352
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
353
|
+
// 兼容已废弃方式
|
|
354
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
355
|
+
const headerSlot = slots ? slots.header : null;
|
|
356
|
+
if (headerSlot) {
|
|
357
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
358
|
+
}
|
|
359
|
+
}
|
|
350
360
|
if (renderOpts) {
|
|
351
361
|
const compConf = renderer.get(renderOpts.name);
|
|
352
362
|
if (compConf) {
|
|
@@ -615,6 +625,12 @@ export const Cell = {
|
|
|
615
625
|
*/
|
|
616
626
|
renderSeqHeader(params) {
|
|
617
627
|
const { $table, column } = params;
|
|
628
|
+
// 兼容已废弃方式
|
|
629
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
630
|
+
const { slots } = column;
|
|
631
|
+
const headerSlot = slots ? slots.header : null;
|
|
632
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
|
|
633
|
+
}
|
|
618
634
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, $table.getHeaderCellLabel(column)));
|
|
619
635
|
},
|
|
620
636
|
renderSeqCell(params) {
|
|
@@ -644,6 +660,17 @@ export const Cell = {
|
|
|
644
660
|
const { $table, column } = params;
|
|
645
661
|
const { slots } = column;
|
|
646
662
|
const titleSlot = slots ? slots.title : null;
|
|
663
|
+
// 兼容已废弃方式
|
|
664
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
665
|
+
const headerSlot = slots ? slots.header : null;
|
|
666
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot
|
|
667
|
+
? $table.callSlot(headerSlot, params)
|
|
668
|
+
: [
|
|
669
|
+
h('span', {
|
|
670
|
+
class: 'vxe-radio--label'
|
|
671
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
|
|
672
|
+
]));
|
|
673
|
+
}
|
|
647
674
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, [
|
|
648
675
|
h('span', {
|
|
649
676
|
class: 'vxe-radio--label'
|
|
@@ -725,6 +752,13 @@ export const Cell = {
|
|
|
725
752
|
};
|
|
726
753
|
}
|
|
727
754
|
const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
|
|
755
|
+
// 兼容已废弃方式
|
|
756
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
757
|
+
const headerSlot = slots ? slots.header : null;
|
|
758
|
+
if (headerSlot) {
|
|
759
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
760
|
+
}
|
|
761
|
+
}
|
|
728
762
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
729
763
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
730
764
|
h('span', {
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"4.21.
|
|
3
|
+
const tableVersion = `table v${"4.21.9"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
package/lib/index.umd.js
CHANGED
|
@@ -3313,7 +3313,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
3313
3313
|
/* unused harmony import specifier */ var VxeUI;
|
|
3314
3314
|
|
|
3315
3315
|
|
|
3316
|
-
const version = "4.21.
|
|
3316
|
+
const version = "4.21.9";
|
|
3317
3317
|
core_.VxeUI.version = version;
|
|
3318
3318
|
core_.VxeUI.tableVersion = version;
|
|
3319
3319
|
core_.VxeUI.setConfig({
|
|
@@ -4299,7 +4299,7 @@ function getPopupAppendElement(appendTo) {
|
|
|
4299
4299
|
const {
|
|
4300
4300
|
log: log_log
|
|
4301
4301
|
} = core_.VxeUI;
|
|
4302
|
-
const tableVersion = `table v${"4.21.
|
|
4302
|
+
const tableVersion = `table v${"4.21.9"}`;
|
|
4303
4303
|
function createComponentLog(name) {
|
|
4304
4304
|
const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
|
|
4305
4305
|
const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
|
|
@@ -5795,6 +5795,7 @@ function getSlotVNs(vns) {
|
|
|
5795
5795
|
|
|
5796
5796
|
|
|
5797
5797
|
const {
|
|
5798
|
+
getConfig: cell_getConfig,
|
|
5798
5799
|
getI18n: cell_getI18n,
|
|
5799
5800
|
getIcon: cell_getIcon,
|
|
5800
5801
|
renderer: cell_renderer,
|
|
@@ -6169,9 +6170,12 @@ function renderHeaderHandle(params) {
|
|
|
6169
6170
|
editRender,
|
|
6170
6171
|
slots
|
|
6171
6172
|
} = column;
|
|
6172
|
-
|
|
6173
|
-
if (
|
|
6174
|
-
|
|
6173
|
+
// 兼容已废弃方式
|
|
6174
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
6175
|
+
const headerSlot = slots ? slots.header : null;
|
|
6176
|
+
if (headerSlot) {
|
|
6177
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
6178
|
+
}
|
|
6175
6179
|
}
|
|
6176
6180
|
switch (type) {
|
|
6177
6181
|
case 'seq':
|
|
@@ -6234,6 +6238,7 @@ const Cell = {
|
|
|
6234
6238
|
editConfig
|
|
6235
6239
|
} = tableProps;
|
|
6236
6240
|
const {
|
|
6241
|
+
slots,
|
|
6237
6242
|
editRender,
|
|
6238
6243
|
cellRender
|
|
6239
6244
|
} = column;
|
|
@@ -6241,6 +6246,13 @@ const Cell = {
|
|
|
6241
6246
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
6242
6247
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
6243
6248
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
6249
|
+
// 兼容已废弃方式
|
|
6250
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6251
|
+
const headerSlot = slots ? slots.header : null;
|
|
6252
|
+
if (headerSlot) {
|
|
6253
|
+
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6244
6256
|
if (renderOpts) {
|
|
6245
6257
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
6246
6258
|
if (compConf) {
|
|
@@ -6587,6 +6599,14 @@ const Cell = {
|
|
|
6587
6599
|
$table,
|
|
6588
6600
|
column
|
|
6589
6601
|
} = params;
|
|
6602
|
+
// 兼容已废弃方式
|
|
6603
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6604
|
+
const {
|
|
6605
|
+
slots
|
|
6606
|
+
} = column;
|
|
6607
|
+
const headerSlot = slots ? slots.header : null;
|
|
6608
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
|
|
6609
|
+
}
|
|
6590
6610
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, $table.getHeaderCellLabel(column)));
|
|
6591
6611
|
},
|
|
6592
6612
|
renderSeqCell(params) {
|
|
@@ -6630,6 +6650,13 @@ const Cell = {
|
|
|
6630
6650
|
slots
|
|
6631
6651
|
} = column;
|
|
6632
6652
|
const titleSlot = slots ? slots.title : null;
|
|
6653
|
+
// 兼容已废弃方式
|
|
6654
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6655
|
+
const headerSlot = slots ? slots.header : null;
|
|
6656
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6657
|
+
class: 'vxe-radio--label'
|
|
6658
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))]));
|
|
6659
|
+
}
|
|
6633
6660
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6634
6661
|
class: 'vxe-radio--label'
|
|
6635
6662
|
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))]));
|
|
@@ -6758,6 +6785,13 @@ const Cell = {
|
|
|
6758
6785
|
disabled: isAllCheckboxDisabled,
|
|
6759
6786
|
indeterminate: isAllCheckboxIndeterminate
|
|
6760
6787
|
};
|
|
6788
|
+
// 兼容已废弃方式
|
|
6789
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6790
|
+
const headerSlot = slots ? slots.header : null;
|
|
6791
|
+
if (headerSlot) {
|
|
6792
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
6793
|
+
}
|
|
6794
|
+
}
|
|
6761
6795
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
6762
6796
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6763
6797
|
class: 'vxe-checkbox--label'
|