vxe-table 3.23.8 → 3.23.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/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.1788921173919.ttf → iconfont.1788956861004.ttf} +0 -0
- /package/es/{iconfont.1788921173919.woff → iconfont.1788956861004.woff} +0 -0
- /package/es/{iconfont.1788921173919.woff2 → iconfont.1788956861004.woff2} +0 -0
- /package/lib/{iconfont.1788921173919.ttf → iconfont.1788956861004.ttf} +0 -0
- /package/lib/{iconfont.1788921173919.woff → iconfont.1788956861004.woff} +0 -0
- /package/lib/{iconfont.1788921173919.woff2 → iconfont.1788956861004.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
|
|
|
4
4
|
import { updateCellTitle } from '../../ui/src/dom';
|
|
5
5
|
import { createColumn, getRowid } from './util';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
|
-
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
7
|
+
const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
|
|
8
8
|
function renderTitlePrefixIcon(h, params) {
|
|
9
9
|
const { $table, column } = params;
|
|
10
10
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
@@ -284,9 +284,12 @@ function renderHeaderHandle(h, params) {
|
|
|
284
284
|
const tableProps = $table;
|
|
285
285
|
const { editConfig } = tableProps;
|
|
286
286
|
const { type, filters, sortable, editRender, slots } = column;
|
|
287
|
-
|
|
288
|
-
if (
|
|
289
|
-
|
|
287
|
+
// 兼容已废弃方式
|
|
288
|
+
if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
289
|
+
const headerSlot = slots ? slots.header : null;
|
|
290
|
+
if (headerSlot) {
|
|
291
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
|
|
292
|
+
}
|
|
290
293
|
}
|
|
291
294
|
switch (type) {
|
|
292
295
|
case 'seq':
|
|
@@ -346,11 +349,18 @@ export const Cell = {
|
|
|
346
349
|
const { $table, column } = params;
|
|
347
350
|
const tableProps = $table;
|
|
348
351
|
const { editConfig } = tableProps;
|
|
349
|
-
const { editRender, cellRender } = column;
|
|
352
|
+
const { slots, editRender, cellRender } = column;
|
|
350
353
|
const isEnableEdit = editConfig && isEnableConf(editConfig);
|
|
351
354
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
352
355
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
353
356
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
357
|
+
// 兼容已废弃方式
|
|
358
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
359
|
+
const headerSlot = slots ? slots.header : null;
|
|
360
|
+
if (headerSlot) {
|
|
361
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
|
|
362
|
+
}
|
|
363
|
+
}
|
|
354
364
|
if (renderOpts) {
|
|
355
365
|
const compConf = renderer.get(renderOpts.name);
|
|
356
366
|
const rtHeader = compConf ? (compConf.renderTableHeader || compConf.renderHeader) : null;
|
|
@@ -620,6 +630,12 @@ export const Cell = {
|
|
|
620
630
|
*/
|
|
621
631
|
renderSeqHeader(h, params) {
|
|
622
632
|
const { $table, column } = params;
|
|
633
|
+
// 兼容已废弃方式
|
|
634
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
635
|
+
const { slots } = column;
|
|
636
|
+
const headerSlot = slots ? slots.header : null;
|
|
637
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : $table.getHeaderCellLabel(column)));
|
|
638
|
+
}
|
|
623
639
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, $table.getHeaderCellLabel(column)));
|
|
624
640
|
},
|
|
625
641
|
renderSeqCell(h, params) {
|
|
@@ -647,6 +663,17 @@ export const Cell = {
|
|
|
647
663
|
const { $table, column } = params;
|
|
648
664
|
const { slots } = column;
|
|
649
665
|
const titleSlot = slots ? slots.title : null;
|
|
666
|
+
// 兼容已废弃方式
|
|
667
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
668
|
+
const headerSlot = slots ? slots.header : null;
|
|
669
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot
|
|
670
|
+
? $table.callSlot(headerSlot, params, h)
|
|
671
|
+
: [
|
|
672
|
+
h('span', {
|
|
673
|
+
class: 'vxe-radio--label'
|
|
674
|
+
}, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))
|
|
675
|
+
]));
|
|
676
|
+
}
|
|
650
677
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, [
|
|
651
678
|
h('span', {
|
|
652
679
|
class: 'vxe-radio--label'
|
|
@@ -729,6 +756,13 @@ export const Cell = {
|
|
|
729
756
|
};
|
|
730
757
|
}
|
|
731
758
|
const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
|
|
759
|
+
// 兼容已废弃方式
|
|
760
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
761
|
+
const headerSlot = slots ? slots.header : null;
|
|
762
|
+
if (headerSlot) {
|
|
763
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
|
|
764
|
+
}
|
|
765
|
+
}
|
|
732
766
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
733
767
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
|
|
734
768
|
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${"3.23.
|
|
3
|
+
const tableVersion = `table v${"3.23.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
|
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
3314
3314
|
/* unused harmony import specifier */ var VxeUI;
|
|
3315
3315
|
|
|
3316
3316
|
|
|
3317
|
-
const version = "3.23.
|
|
3317
|
+
const version = "3.23.9";
|
|
3318
3318
|
core_.VxeUI.version = version;
|
|
3319
3319
|
core_.VxeUI.tableVersion = version;
|
|
3320
3320
|
core_.VxeUI.setConfig({
|
|
@@ -4276,7 +4276,7 @@ function getPopupAppendElement(appendTo) {
|
|
|
4276
4276
|
const {
|
|
4277
4277
|
log: log_log
|
|
4278
4278
|
} = core_.VxeUI;
|
|
4279
|
-
const tableVersion = `table v${"3.23.
|
|
4279
|
+
const tableVersion = `table v${"3.23.9"}`;
|
|
4280
4280
|
function createComponentLog(name) {
|
|
4281
4281
|
const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
|
|
4282
4282
|
const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
|
|
@@ -5755,6 +5755,7 @@ function getSlotVNs(vns) {
|
|
|
5755
5755
|
|
|
5756
5756
|
|
|
5757
5757
|
const {
|
|
5758
|
+
getConfig: cell_getConfig,
|
|
5758
5759
|
getI18n: cell_getI18n,
|
|
5759
5760
|
getIcon: cell_getIcon,
|
|
5760
5761
|
renderer: cell_renderer,
|
|
@@ -6101,9 +6102,12 @@ function renderHeaderHandle(h, params) {
|
|
|
6101
6102
|
editRender,
|
|
6102
6103
|
slots
|
|
6103
6104
|
} = column;
|
|
6104
|
-
|
|
6105
|
-
if (
|
|
6106
|
-
|
|
6105
|
+
// 兼容已废弃方式
|
|
6106
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
6107
|
+
const headerSlot = slots ? slots.header : null;
|
|
6108
|
+
if (headerSlot) {
|
|
6109
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
|
|
6110
|
+
}
|
|
6107
6111
|
}
|
|
6108
6112
|
switch (type) {
|
|
6109
6113
|
case 'seq':
|
|
@@ -6166,6 +6170,7 @@ const Cell = {
|
|
|
6166
6170
|
editConfig
|
|
6167
6171
|
} = tableProps;
|
|
6168
6172
|
const {
|
|
6173
|
+
slots,
|
|
6169
6174
|
editRender,
|
|
6170
6175
|
cellRender
|
|
6171
6176
|
} = column;
|
|
@@ -6173,6 +6178,13 @@ const Cell = {
|
|
|
6173
6178
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
|
|
6174
6179
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
|
|
6175
6180
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
6181
|
+
// 兼容已废弃方式
|
|
6182
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6183
|
+
const headerSlot = slots ? slots.header : null;
|
|
6184
|
+
if (headerSlot) {
|
|
6185
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6176
6188
|
if (renderOpts) {
|
|
6177
6189
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
6178
6190
|
const rtHeader = compConf ? compConf.renderTableHeader || compConf.renderHeader : null;
|
|
@@ -6507,6 +6519,14 @@ const Cell = {
|
|
|
6507
6519
|
$table,
|
|
6508
6520
|
column
|
|
6509
6521
|
} = params;
|
|
6522
|
+
// 兼容已废弃方式
|
|
6523
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6524
|
+
const {
|
|
6525
|
+
slots
|
|
6526
|
+
} = column;
|
|
6527
|
+
const headerSlot = slots ? slots.header : null;
|
|
6528
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : $table.getHeaderCellLabel(column)));
|
|
6529
|
+
}
|
|
6510
6530
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, $table.getHeaderCellLabel(column)));
|
|
6511
6531
|
},
|
|
6512
6532
|
renderSeqCell(h, params) {
|
|
@@ -6546,6 +6566,13 @@ const Cell = {
|
|
|
6546
6566
|
slots
|
|
6547
6567
|
} = column;
|
|
6548
6568
|
const titleSlot = slots ? slots.title : null;
|
|
6569
|
+
// 兼容已废弃方式
|
|
6570
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6571
|
+
const headerSlot = slots ? slots.header : null;
|
|
6572
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : [h('span', {
|
|
6573
|
+
class: 'vxe-radio--label'
|
|
6574
|
+
}, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))]));
|
|
6575
|
+
}
|
|
6549
6576
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, [h('span', {
|
|
6550
6577
|
class: 'vxe-radio--label'
|
|
6551
6578
|
}, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))]));
|
|
@@ -6667,6 +6694,13 @@ const Cell = {
|
|
|
6667
6694
|
disabled: isAllCheckboxDisabled,
|
|
6668
6695
|
indeterminate: isAllCheckboxIndeterminate
|
|
6669
6696
|
};
|
|
6697
|
+
// 兼容已废弃方式
|
|
6698
|
+
if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
6699
|
+
const headerSlot = slots ? slots.header : null;
|
|
6700
|
+
if (headerSlot) {
|
|
6701
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6670
6704
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
6671
6705
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
|
|
6672
6706
|
class: 'vxe-checkbox--label'
|