vxe-table 3.23.8 → 3.23.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/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/cell.js +39 -5
- package/es/table/style.css +1 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +1 -2
- 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 +39 -5
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +37 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/style/style.css +1 -2
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +1 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/src/cell.ts +51 -5
- package/styles/components/table.scss +10 -1
- /package/es/{iconfont.1788921173919.ttf → iconfont.1789034993794.ttf} +0 -0
- /package/es/{iconfont.1788921173919.woff → iconfont.1789034993794.woff} +0 -0
- /package/es/{iconfont.1788921173919.woff2 → iconfont.1789034993794.woff2} +0 -0
- /package/lib/{iconfont.1788921173919.ttf → iconfont.1789034993794.ttf} +0 -0
- /package/lib/{iconfont.1788921173919.woff → iconfont.1789034993794.woff} +0 -0
- /package/lib/{iconfont.1788921173919.woff2 → iconfont.1789034993794.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/table/style.css
CHANGED
|
@@ -3997,7 +3997,7 @@
|
|
|
3997
3997
|
.vxe-table--render-default .vxe-cell--wrapper {
|
|
3998
3998
|
margin: auto 0;
|
|
3999
3999
|
}
|
|
4000
|
-
.vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > .vxe-reusekeep-control {
|
|
4000
|
+
.vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > div > .vxe-reusekeep-control, .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > span > .vxe-reusekeep-control, .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > .vxe-reusekeep-control {
|
|
4001
4001
|
position: absolute;
|
|
4002
4002
|
width: 0;
|
|
4003
4003
|
height: 0;
|
|
@@ -4006,7 +4006,6 @@
|
|
|
4006
4006
|
padding: 0;
|
|
4007
4007
|
outline: none;
|
|
4008
4008
|
}
|
|
4009
|
-
|
|
4010
4009
|
/*valid error*/
|
|
4011
4010
|
div.vxe-table--tooltip-wrapper.vxe-table--valid-error {
|
|
4012
4011
|
padding: 0;
|