vxe-table 4.16.14 → 4.16.16
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/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/grid/src/grid.js +7 -2
- package/es/grid/style.css +0 -1
- package/es/grid/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/en-US.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/menu/hook.js +9 -3
- package/es/table/module/menu/panel.js +113 -109
- package/es/table/src/header.js +4 -1
- package/es/table/src/table.js +55 -32
- package/es/table/src/util.js +19 -4
- package/es/ui/index.js +8 -5
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +0 -1
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/src/grid.js +6 -2
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +89 -41
- 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/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/filter/panel.js +3 -2
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +12 -3
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/menu/panel.js +22 -12
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/header.js +3 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +11 -11
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +26 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +8 -5
- 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-grid/style/style.css +0 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +8 -2
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/table/module/filter/panel.ts +2 -1
- package/packages/table/module/menu/hook.ts +11 -3
- package/packages/table/module/menu/panel.ts +112 -108
- package/packages/table/src/header.ts +3 -1
- package/packages/table/src/table.ts +55 -32
- package/packages/table/src/util.ts +19 -2
- package/packages/ui/index.ts +7 -4
- package/styles/components/grid.scss +0 -1
- /package/es/{iconfont.1758158507786.ttf → iconfont.1758344508103.ttf} +0 -0
- /package/es/{iconfont.1758158507786.woff → iconfont.1758344508103.woff} +0 -0
- /package/es/{iconfont.1758158507786.woff2 → iconfont.1758344508103.woff2} +0 -0
- /package/lib/{iconfont.1758158507786.ttf → iconfont.1758344508103.ttf} +0 -0
- /package/lib/{iconfont.1758158507786.woff → iconfont.1758344508103.woff} +0 -0
- /package/lib/{iconfont.1758158507786.woff2 → iconfont.1758344508103.woff2} +0 -0
|
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils'
|
|
|
4
4
|
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
|
-
import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight } from './util'
|
|
7
|
+
import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn } from './util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
@@ -350,6 +350,7 @@ export default defineVxeComponent({
|
|
|
350
350
|
const refTableRightFooter = ref() as Ref<ComponentPublicInstance>
|
|
351
351
|
|
|
352
352
|
const refTeleportWrapper = ref<HTMLDivElement>()
|
|
353
|
+
const refPopupWrapperElem = ref<HTMLDivElement>()
|
|
353
354
|
|
|
354
355
|
const refLeftContainer = ref() as Ref<HTMLDivElement>
|
|
355
356
|
const refRightContainer = ref() as Ref<HTMLDivElement>
|
|
@@ -4025,6 +4026,10 @@ export default defineVxeComponent({
|
|
|
4025
4026
|
if ($xeTable.handleUpdateCustomColumn) {
|
|
4026
4027
|
$xeTable.handleUpdateCustomColumn()
|
|
4027
4028
|
}
|
|
4029
|
+
const columnOpts = computeColumnOpts.value
|
|
4030
|
+
if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
|
|
4031
|
+
warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false'])
|
|
4032
|
+
}
|
|
4028
4033
|
reactData.isColLoading = false
|
|
4029
4034
|
return handleLazyRecalculate(false, true, true)
|
|
4030
4035
|
})
|
|
@@ -8572,18 +8577,16 @@ export default defineVxeComponent({
|
|
|
8572
8577
|
const scrollbarXToTop = computeScrollbarXToTop.value
|
|
8573
8578
|
const { clientX: dragClientX } = evnt
|
|
8574
8579
|
const dragBtnElem = evnt.target as HTMLDivElement
|
|
8580
|
+
let cell = dragBtnElem.parentElement as HTMLTableCellElement | null
|
|
8575
8581
|
let resizeColumn = column
|
|
8576
8582
|
const isDragGroupCol = column.children && column.children.length
|
|
8577
8583
|
if (isDragGroupCol) {
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
|
|
8585
|
-
const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
|
|
8586
|
-
cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
|
|
8584
|
+
resizeColumn = getLastChildColumn(column)
|
|
8585
|
+
if (isDragGroupCol) {
|
|
8586
|
+
const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
|
|
8587
|
+
const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
|
|
8588
|
+
cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
|
|
8589
|
+
}
|
|
8587
8590
|
}
|
|
8588
8591
|
if (!cell) {
|
|
8589
8592
|
return
|
|
@@ -11111,9 +11114,9 @@ export default defineVxeComponent({
|
|
|
11111
11114
|
}
|
|
11112
11115
|
if (isRollY) {
|
|
11113
11116
|
const yThreshold = computeScrollYThreshold.value
|
|
11114
|
-
isTop = scrollTop <=
|
|
11117
|
+
isTop = scrollTop <= 1
|
|
11115
11118
|
if (!isTop) {
|
|
11116
|
-
isBottom = scrollTop + bodyHeight >= scrollHeight
|
|
11119
|
+
isBottom = scrollTop + bodyHeight >= scrollHeight - 1
|
|
11117
11120
|
}
|
|
11118
11121
|
if (scrollTop > lastScrollTop) {
|
|
11119
11122
|
direction = 'bottom'
|
|
@@ -12272,7 +12275,7 @@ export default defineVxeComponent({
|
|
|
12272
12275
|
const renderVN = () => {
|
|
12273
12276
|
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
|
|
12274
12277
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData
|
|
12275
|
-
const { teleportToWrapperElem } = internalData
|
|
12278
|
+
const { teleportToWrapperElem, popupToWrapperElem } = internalData
|
|
12276
12279
|
const { leftList, rightList } = columnStore
|
|
12277
12280
|
const loadingSlot = slots.loading
|
|
12278
12281
|
const tipSlots = {
|
|
@@ -12478,16 +12481,38 @@ export default defineVxeComponent({
|
|
|
12478
12481
|
])
|
|
12479
12482
|
])
|
|
12480
12483
|
]),
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12484
|
+
h('div', {
|
|
12485
|
+
key: 'tpw'
|
|
12486
|
+
}, [
|
|
12487
|
+
h(Teleport, {
|
|
12488
|
+
to: popupToWrapperElem,
|
|
12489
|
+
disabled: !($xeGGWrapper && popupToWrapperElem)
|
|
12490
|
+
}, [
|
|
12491
|
+
h('div', {
|
|
12492
|
+
ref: refPopupWrapperElem
|
|
12493
|
+
}, [
|
|
12494
|
+
/**
|
|
12495
|
+
* 筛选
|
|
12496
|
+
*/
|
|
12497
|
+
initStore.filter
|
|
12498
|
+
? h(TableFilterPanelComponent, {
|
|
12499
|
+
key: 'tf',
|
|
12500
|
+
ref: refTableFilter,
|
|
12501
|
+
filterStore
|
|
12502
|
+
})
|
|
12503
|
+
: renderEmptyElement($xeTable),
|
|
12504
|
+
/**
|
|
12505
|
+
* 快捷菜单
|
|
12506
|
+
*/
|
|
12507
|
+
isContentMenu
|
|
12508
|
+
? h(TableMenuPanelComponent, {
|
|
12509
|
+
key: 'tm',
|
|
12510
|
+
ref: refTableMenu
|
|
12511
|
+
})
|
|
12512
|
+
: renderEmptyElement($xeTable)
|
|
12513
|
+
])
|
|
12514
|
+
])
|
|
12515
|
+
]),
|
|
12491
12516
|
/**
|
|
12492
12517
|
* 导入
|
|
12493
12518
|
*/
|
|
@@ -12508,15 +12533,6 @@ export default defineVxeComponent({
|
|
|
12508
12533
|
storeData: reactData.exportStore
|
|
12509
12534
|
})
|
|
12510
12535
|
: renderEmptyElement($xeTable),
|
|
12511
|
-
/**
|
|
12512
|
-
* 快捷菜单
|
|
12513
|
-
*/
|
|
12514
|
-
isContentMenu
|
|
12515
|
-
? h(TableMenuPanelComponent, {
|
|
12516
|
-
key: 'tm',
|
|
12517
|
-
ref: refTableMenu
|
|
12518
|
-
})
|
|
12519
|
-
: renderEmptyElement($xeTable),
|
|
12520
12536
|
/**
|
|
12521
12537
|
* 提示相关
|
|
12522
12538
|
*/
|
|
@@ -12825,6 +12841,13 @@ export default defineVxeComponent({
|
|
|
12825
12841
|
internalData.teleportToWrapperElem = classifyWrapperEl
|
|
12826
12842
|
}
|
|
12827
12843
|
}
|
|
12844
|
+
if ($xeGGWrapper) {
|
|
12845
|
+
const { refPopupContainerElem } = $xeGGWrapper.getRefMaps()
|
|
12846
|
+
const popupContainerEl = refPopupContainerElem.value
|
|
12847
|
+
if (popupContainerEl) {
|
|
12848
|
+
internalData.popupToWrapperElem = popupContainerEl
|
|
12849
|
+
}
|
|
12850
|
+
}
|
|
12828
12851
|
|
|
12829
12852
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
12830
12853
|
initTpImg()
|
|
@@ -130,6 +130,7 @@ export function createInternalData (): TableInternalData {
|
|
|
130
130
|
tFooterHeight: 0,
|
|
131
131
|
|
|
132
132
|
teleportToWrapperElem: null,
|
|
133
|
+
popupToWrapperElem: null,
|
|
133
134
|
|
|
134
135
|
inited: false,
|
|
135
136
|
tooltipTimeout: null,
|
|
@@ -611,6 +612,22 @@ export function getRootColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
611
612
|
return column
|
|
612
613
|
}
|
|
613
614
|
|
|
615
|
+
export function getFirstChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
|
|
616
|
+
const { children } = column
|
|
617
|
+
if (children && children.length) {
|
|
618
|
+
return getFirstChildColumn(XEUtils.first(children))
|
|
619
|
+
}
|
|
620
|
+
return column
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export function getLastChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
|
|
624
|
+
const { children } = column
|
|
625
|
+
if (children && children.length) {
|
|
626
|
+
return getFirstChildColumn(XEUtils.last(children))
|
|
627
|
+
}
|
|
628
|
+
return column
|
|
629
|
+
}
|
|
630
|
+
|
|
614
631
|
const lineOffsetSizes = {
|
|
615
632
|
mini: 3,
|
|
616
633
|
small: 2,
|
|
@@ -618,7 +635,7 @@ const lineOffsetSizes = {
|
|
|
618
635
|
large: 0
|
|
619
636
|
}
|
|
620
637
|
|
|
621
|
-
|
|
638
|
+
function countTreeExpand (prevRow: any, params: VxeTableDefines.CellRenderBodyParams) {
|
|
622
639
|
let count = 1
|
|
623
640
|
if (!prevRow) {
|
|
624
641
|
return count
|
|
@@ -641,7 +658,7 @@ const countTreeExpand = (prevRow: any, params: VxeTableDefines.CellRenderBodyPar
|
|
|
641
658
|
return count
|
|
642
659
|
}
|
|
643
660
|
|
|
644
|
-
export
|
|
661
|
+
export function getOffsetSize ($xeTable: VxeTableConstructor) {
|
|
645
662
|
const { computeSize } = $xeTable.getComputeMaps()
|
|
646
663
|
const vSize = computeSize.value
|
|
647
664
|
if (vSize) {
|
package/packages/ui/index.ts
CHANGED
|
@@ -99,9 +99,11 @@ VxeUI.setConfig({
|
|
|
99
99
|
footerCellConfig: {
|
|
100
100
|
height: 'unset'
|
|
101
101
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
menuConfig: {
|
|
103
|
+
// visibleMethod () {},
|
|
104
|
+
// transfer: false,
|
|
105
|
+
destroyOnClose: true
|
|
106
|
+
},
|
|
105
107
|
customConfig: {
|
|
106
108
|
// enabled: false,
|
|
107
109
|
allowVisible: true,
|
|
@@ -148,8 +150,9 @@ VxeUI.setConfig({
|
|
|
148
150
|
filterConfig: {
|
|
149
151
|
// remote: false,
|
|
150
152
|
// filterMethod: null,
|
|
151
|
-
// destroyOnClose: false,
|
|
152
153
|
// isEvery: false,
|
|
154
|
+
// transfer: false,
|
|
155
|
+
destroyOnClose: true,
|
|
153
156
|
multiple: true,
|
|
154
157
|
showIcon: true
|
|
155
158
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|