vxe-table 3.23.7 → 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/locale/lang/en-US.js +2 -2
- package/es/locale/lang/zh-CHT.js +2 -2
- package/es/locale/lang/zh-CN.js +2 -2
- package/es/style.css +1 -1
- package/es/table/src/cell.js +39 -5
- package/es/table/src/table.js +3 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +44 -7
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -2
- package/lib/locale/lang/zh-CHT.js +2 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -2
- package/lib/locale/lang/zh-CN.js +2 -2
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -2
- 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/table/src/table.js +3 -0
- package/lib/table/src/table.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/locale/lang/en-US.ts +2 -2
- package/packages/locale/lang/zh-CHT.ts +2 -2
- package/packages/locale/lang/zh-CN.ts +2 -2
- package/packages/table/src/cell.ts +51 -5
- package/packages/table/src/table.ts +3 -0
- /package/es/{iconfont.1788696064361.ttf → iconfont.1788956861004.ttf} +0 -0
- /package/es/{iconfont.1788696064361.woff → iconfont.1788956861004.woff} +0 -0
- /package/es/{iconfont.1788696064361.woff2 → iconfont.1788956861004.woff2} +0 -0
- /package/lib/{iconfont.1788696064361.ttf → iconfont.1788956861004.ttf} +0 -0
- /package/lib/{iconfont.1788696064361.woff → iconfont.1788956861004.woff} +0 -0
- /package/lib/{iconfont.1788696064361.woff2 → iconfont.1788956861004.woff2} +0 -0
|
@@ -8,7 +8,7 @@ import { getSlotVNs } from '../../ui/src/vn'
|
|
|
8
8
|
|
|
9
9
|
import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, VxeComponentSlotType, TableReactData, TableInternalData } from '../../../types'
|
|
10
10
|
|
|
11
|
-
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI
|
|
11
|
+
const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
13
13
|
function renderTitlePrefixIcon (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
14
14
|
const { $table, column } = params
|
|
@@ -306,10 +306,15 @@ function renderHeaderHandle (h: CreateElement, params: VxeTableDefines.CellRende
|
|
|
306
306
|
const tableProps = $table
|
|
307
307
|
const { editConfig } = tableProps
|
|
308
308
|
const { type, filters, sortable, editRender, slots } = column
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
309
|
+
|
|
310
|
+
// 兼容已废弃方式
|
|
311
|
+
if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
312
|
+
const headerSlot = slots ? slots.header : null
|
|
313
|
+
if (headerSlot) {
|
|
314
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h))
|
|
315
|
+
}
|
|
312
316
|
}
|
|
317
|
+
|
|
313
318
|
switch (type) {
|
|
314
319
|
case 'seq':
|
|
315
320
|
return Cell.renderSeqHeader(h, params)
|
|
@@ -367,11 +372,20 @@ export const Cell = {
|
|
|
367
372
|
const { $table, column } = params
|
|
368
373
|
const tableProps = $table
|
|
369
374
|
const { editConfig } = tableProps
|
|
370
|
-
const { editRender, cellRender } = column
|
|
375
|
+
const { slots, editRender, cellRender } = column
|
|
371
376
|
const isEnableEdit = editConfig && isEnableConf(editConfig)
|
|
372
377
|
const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null
|
|
373
378
|
const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null
|
|
374
379
|
const renderOpts = editRenderOpts || cellRenderOpts
|
|
380
|
+
|
|
381
|
+
// 兼容已废弃方式
|
|
382
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
383
|
+
const headerSlot = slots ? slots.header : null
|
|
384
|
+
if (headerSlot) {
|
|
385
|
+
return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h))
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
375
389
|
if (renderOpts) {
|
|
376
390
|
const compConf = renderer.get(renderOpts.name)
|
|
377
391
|
const rtHeader = compConf ? (compConf.renderTableHeader || compConf.renderHeader) : null
|
|
@@ -640,6 +654,14 @@ export const Cell = {
|
|
|
640
654
|
*/
|
|
641
655
|
renderSeqHeader (h: CreateElement, params: VxeTableDefines.CellRenderHeaderParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
642
656
|
const { $table, column } = params
|
|
657
|
+
|
|
658
|
+
// 兼容已废弃方式
|
|
659
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
660
|
+
const { slots } = column
|
|
661
|
+
const headerSlot = slots ? slots.header : null
|
|
662
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : $table.getHeaderCellLabel(column)))
|
|
663
|
+
}
|
|
664
|
+
|
|
643
665
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, $table.getHeaderCellLabel(column)))
|
|
644
666
|
},
|
|
645
667
|
renderSeqCell (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
|
|
@@ -668,6 +690,21 @@ export const Cell = {
|
|
|
668
690
|
const { $table, column } = params
|
|
669
691
|
const { slots } = column
|
|
670
692
|
const titleSlot = slots ? slots.title : null
|
|
693
|
+
|
|
694
|
+
// 兼容已废弃方式
|
|
695
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
696
|
+
const headerSlot = slots ? slots.header : null
|
|
697
|
+
return renderHeaderCellBaseVNs(h, params,
|
|
698
|
+
renderTitleContent(h, params, headerSlot
|
|
699
|
+
? $table.callSlot(headerSlot, params, h)
|
|
700
|
+
: [
|
|
701
|
+
h('span', {
|
|
702
|
+
class: 'vxe-radio--label'
|
|
703
|
+
}, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))
|
|
704
|
+
])
|
|
705
|
+
)
|
|
706
|
+
}
|
|
707
|
+
|
|
671
708
|
return renderHeaderCellBaseVNs(h, params,
|
|
672
709
|
renderTitleContent(h, params, [
|
|
673
710
|
h('span', {
|
|
@@ -757,6 +794,15 @@ export const Cell = {
|
|
|
757
794
|
}
|
|
758
795
|
}
|
|
759
796
|
const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
|
|
797
|
+
|
|
798
|
+
// 兼容已废弃方式
|
|
799
|
+
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
800
|
+
const headerSlot = slots ? slots.header : null
|
|
801
|
+
if (headerSlot) {
|
|
802
|
+
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)))
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
760
806
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
761
807
|
return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
|
|
762
808
|
h('span', {
|
|
@@ -1873,6 +1873,9 @@ export default {
|
|
|
1873
1873
|
if (mouseOpts.area && areaOpts.selectCellByHeader && columnOpts.drag && columnDragOpts.trigger === 'cell') {
|
|
1874
1874
|
errLog('vxe.error.notSupportProp', ['area-config.selectCellByHeader & column-config.drag', 'column-drag-config.trigger=cell', 'column-drag-config.trigger=default | area-config.selectCellByHeader=false'])
|
|
1875
1875
|
}
|
|
1876
|
+
if (mouseOpts.area && props.spanMethod) {
|
|
1877
|
+
warnLog('vxe.error.notSupportProp', ['mouse-config.area', 'span-method', 'merge-cells'])
|
|
1878
|
+
}
|
|
1876
1879
|
}
|
|
1877
1880
|
if (!$xeTable.handlePivotTableAggData) {
|
|
1878
1881
|
if (customOpts.allowGroup) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|