vxe-table 3.20.10 → 3.20.12
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/module/custom/mixin.js +76 -5
- package/es/table/module/custom/panel.js +18 -12
- package/es/table/module/keyboard/mixin.js +1 -3
- package/es/table/src/body.js +4 -2
- package/es/table/src/footer.js +1 -0
- package/es/table/src/header.js +6 -2
- package/es/table/src/methods.js +67 -21
- package/es/table/src/table.js +19 -18
- package/es/table/src/util.js +6 -3
- package/es/table/style.css +14 -0
- 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 +14 -0
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +164 -73
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +81 -5
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +20 -12
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +1 -4
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/body.js +8 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +4 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +13 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +17 -17
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +14 -0
- 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 +14 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/mixin.ts +77 -6
- package/packages/table/module/custom/panel.ts +19 -13
- package/packages/table/module/keyboard/mixin.ts +1 -3
- package/packages/table/src/body.ts +10 -8
- package/packages/table/src/footer.ts +5 -4
- package/packages/table/src/header.ts +15 -10
- package/packages/table/src/methods.ts +71 -22
- package/packages/table/src/table.ts +19 -18
- package/packages/table/src/util.ts +7 -3
- package/styles/components/table-module/custom.scss +14 -0
- /package/es/{iconfont.1774663245801.ttf → iconfont.1776048358910.ttf} +0 -0
- /package/es/{iconfont.1774663245801.woff → iconfont.1776048358910.woff} +0 -0
- /package/es/{iconfont.1774663245801.woff2 → iconfont.1776048358910.woff2} +0 -0
- /package/lib/{iconfont.1774663245801.ttf → iconfont.1776048358910.ttf} +0 -0
- /package/lib/{iconfont.1774663245801.woff → iconfont.1776048358910.woff} +0 -0
- /package/lib/{iconfont.1774663245801.woff2 → iconfont.1776048358910.woff2} +0 -0
|
@@ -1006,8 +1006,8 @@ function updateStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
|
1006
1006
|
const internalData = $xeTable as unknown as TableInternalData
|
|
1007
1007
|
|
|
1008
1008
|
const { mouseConfig } = props
|
|
1009
|
-
const { isGroup,
|
|
1010
|
-
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData
|
|
1009
|
+
const { isGroup, tableColumn, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isColLoading } = reactData
|
|
1010
|
+
const { visibleColumn, tableHeight, elemStore, currentRow, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData
|
|
1011
1011
|
const $xeGanttView = internalData.xeGanttView
|
|
1012
1012
|
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
1013
1013
|
if (!el || (internalData.tBodyHeight && !el.clientHeight)) {
|
|
@@ -1394,7 +1394,7 @@ function handleDefaultRadioChecked ($xeTable: VxeTableConstructor & VxeTablePriv
|
|
|
1394
1394
|
const { checkRowKey: rowid, reserve } = radioOpts
|
|
1395
1395
|
if (rowid) {
|
|
1396
1396
|
if (fullDataRowIdData[rowid]) {
|
|
1397
|
-
handleCheckedRadioRow(fullDataRowIdData[rowid].row, true)
|
|
1397
|
+
handleCheckedRadioRow($xeTable, fullDataRowIdData[rowid].row, true)
|
|
1398
1398
|
}
|
|
1399
1399
|
if (reserve) {
|
|
1400
1400
|
const rowkey = getRowkey($xeTable)
|
|
@@ -1454,7 +1454,7 @@ function handleCheckboxReserveRow ($xeTable: VxeTableConstructor & VxeTablePriva
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
function handleCheckedRadioRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any, isForce
|
|
1457
|
+
function handleCheckedRadioRow ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any, isForce: boolean) {
|
|
1458
1458
|
const reactData = $xeTable as unknown as TableReactData
|
|
1459
1459
|
|
|
1460
1460
|
const radioOpts = $xeTable.computeRadioOpts
|
|
@@ -1636,8 +1636,8 @@ function handleReserveStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
1636
1636
|
const internalData = $xeTable as unknown as TableInternalData
|
|
1637
1637
|
|
|
1638
1638
|
const { treeConfig } = props
|
|
1639
|
-
const { expandColumn,
|
|
1640
|
-
const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps } = internalData
|
|
1639
|
+
const { expandColumn, selectRadioRow } = reactData
|
|
1640
|
+
const { fullDataRowIdData, fullAllDataRowIdData, radioReserveRow, selectCheckboxMaps, treeExpandedMaps, rowExpandedMaps, currentRow } = internalData
|
|
1641
1641
|
const expandOpts = $xeTable.computeExpandOpts
|
|
1642
1642
|
const treeOpts = $xeTable.computeTreeOpts
|
|
1643
1643
|
const radioOpts = $xeTable.computeRadioOpts
|
|
@@ -1661,7 +1661,7 @@ function handleReserveStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
1661
1661
|
handleCheckedCheckboxRow($xeTable, handleReserveRow($xeTable, internalData.checkboxReserveRowMap), true, true)
|
|
1662
1662
|
}
|
|
1663
1663
|
if (currentRow && !fullAllDataRowIdData[getRowid($xeTable, currentRow)]) {
|
|
1664
|
-
|
|
1664
|
+
internalData.currentRow = null // 刷新当前行状态
|
|
1665
1665
|
}
|
|
1666
1666
|
// 行展开
|
|
1667
1667
|
internalData.rowExpandedMaps = expandColumn ? getRecoverRowMaps($xeTable, rowExpandedMaps) : {} // 刷新行展开状态
|
|
@@ -2556,10 +2556,13 @@ const calcCellHeight = ($xeTable: VxeTableConstructor) => {
|
|
|
2556
2556
|
const { treeConfig } = props
|
|
2557
2557
|
const { tableData, isAllOverflow, scrollYLoad, scrollXLoad } = reactData
|
|
2558
2558
|
const { fullAllDataRowIdData } = internalData
|
|
2559
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
2560
|
+
if (!el || !el.clientWidth) {
|
|
2561
|
+
return
|
|
2562
|
+
}
|
|
2559
2563
|
const treeOpts = $xeTable.computeTreeOpts
|
|
2560
2564
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight
|
|
2561
|
-
|
|
2562
|
-
if (el && !isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2565
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2563
2566
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
2564
2567
|
el.setAttribute('data-calc-row', 'Y')
|
|
2565
2568
|
tableData.forEach(row => {
|
|
@@ -3047,6 +3050,10 @@ function calcScrollbar ($xeTable: VxeTableConstructor & VxeTablePrivateMethods)
|
|
|
3047
3050
|
const { scrollXWidth, scrollYHeight } = reactData
|
|
3048
3051
|
const { elemStore } = internalData
|
|
3049
3052
|
const scrollbarOpts = $xeTable.computeScrollbarOpts
|
|
3053
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
3054
|
+
if (!el || !el.clientWidth) {
|
|
3055
|
+
return
|
|
3056
|
+
}
|
|
3050
3057
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper'])
|
|
3051
3058
|
const headerTableElem = getRefElem(elemStore['main-header-table'])
|
|
3052
3059
|
const footerTableElem = getRefElem(elemStore['main-footer-table'])
|
|
@@ -3135,9 +3142,11 @@ function handleRecalculateStyle ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
3135
3142
|
}
|
|
3136
3143
|
|
|
3137
3144
|
function handleLazyRecalculate ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, reFull: boolean, reWidth: boolean, reHeight: boolean) {
|
|
3145
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3138
3146
|
const internalData = $xeTable as unknown as TableInternalData
|
|
3139
3147
|
|
|
3140
3148
|
return new Promise<void>(resolve => {
|
|
3149
|
+
const { customStore } = reactData
|
|
3141
3150
|
const { rceTimeout, rceRunTime } = internalData
|
|
3142
3151
|
const $xeGanttView = internalData.xeGanttView
|
|
3143
3152
|
const resizeOpts = $xeTable.computeResizeOpts
|
|
@@ -3147,6 +3156,9 @@ function handleLazyRecalculate ($xeTable: VxeTableConstructor & VxeTablePrivateM
|
|
|
3147
3156
|
autoCellWidth($xeTable)
|
|
3148
3157
|
updateRowExpandStyle($xeTable)
|
|
3149
3158
|
}
|
|
3159
|
+
if (customStore.visible && $xeTable.handleCustomStyle) {
|
|
3160
|
+
$xeTable.handleCustomStyle()
|
|
3161
|
+
}
|
|
3150
3162
|
if (rceTimeout) {
|
|
3151
3163
|
clearTimeout(rceTimeout)
|
|
3152
3164
|
if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
|
|
@@ -4198,6 +4210,10 @@ function updateColumnOffsetLeft ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
4198
4210
|
const internalData = $xeTable as unknown as TableInternalData
|
|
4199
4211
|
|
|
4200
4212
|
const { visibleColumn, fullColumnIdData } = internalData
|
|
4213
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4214
|
+
if (!el || !el.clientWidth) {
|
|
4215
|
+
return
|
|
4216
|
+
}
|
|
4201
4217
|
let offsetLeft = 0
|
|
4202
4218
|
for (let cIndex = 0, rLen = visibleColumn.length; cIndex < rLen; cIndex++) {
|
|
4203
4219
|
const column = visibleColumn[cIndex]
|
|
@@ -4216,6 +4232,10 @@ function updateRowOffsetTop ($xeTable: VxeTableConstructor & VxeTablePrivateMeth
|
|
|
4216
4232
|
|
|
4217
4233
|
const { expandColumn } = reactData
|
|
4218
4234
|
const { afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData
|
|
4235
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4236
|
+
if (!el || !el.clientWidth) {
|
|
4237
|
+
return
|
|
4238
|
+
}
|
|
4219
4239
|
const expandOpts = $xeTable.computeExpandOpts
|
|
4220
4240
|
const rowOpts = $xeTable.computeRowOpts
|
|
4221
4241
|
const cellOpts = $xeTable.computeCellOpts
|
|
@@ -4243,6 +4263,10 @@ function updateRowExpandStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
4243
4263
|
const internalData = $xeTable as unknown as TableInternalData
|
|
4244
4264
|
|
|
4245
4265
|
const { expandColumn, scrollYLoad, scrollYTop, isScrollYBig } = reactData
|
|
4266
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4267
|
+
if (!el || !el.clientWidth) {
|
|
4268
|
+
return
|
|
4269
|
+
}
|
|
4246
4270
|
const expandOpts = $xeTable.computeExpandOpts
|
|
4247
4271
|
const rowOpts = $xeTable.computeRowOpts
|
|
4248
4272
|
const cellOpts = $xeTable.computeCellOpts
|
|
@@ -4310,6 +4334,10 @@ function updateTreeLineStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
4310
4334
|
}
|
|
4311
4335
|
const { tableData } = reactData
|
|
4312
4336
|
const { fullAllDataRowIdData, treeExpandedMaps } = internalData
|
|
4337
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
4338
|
+
if (!el || !el.clientWidth) {
|
|
4339
|
+
return
|
|
4340
|
+
}
|
|
4313
4341
|
const cellOpts = $xeTable.computeCellOpts
|
|
4314
4342
|
const rowOpts = $xeTable.computeRowOpts
|
|
4315
4343
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight
|
|
@@ -4432,6 +4460,23 @@ function handleColumnVisible (visible: boolean) {
|
|
|
4432
4460
|
}
|
|
4433
4461
|
}
|
|
4434
4462
|
|
|
4463
|
+
function reUpdateCustomStyleEvent ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, evnt: MouseEvent) {
|
|
4464
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
4465
|
+
|
|
4466
|
+
const { customStore } = reactData
|
|
4467
|
+
const customOpts = $xeTable.computeCustomOpts
|
|
4468
|
+
const { popupOptions } = customOpts
|
|
4469
|
+
const { transfer } = popupOptions || {}
|
|
4470
|
+
if (transfer && customStore.visible) {
|
|
4471
|
+
const tableCustom = $xeTable.$refs.refTableCustom as Vue
|
|
4472
|
+
if (tableCustom && $xeTable.handleCustomStyle && !checkTargetElement(evnt.target, [tableCustom.$el as HTMLDivElement], evnt.currentTarget)) {
|
|
4473
|
+
$xeTable.handleCustomStyle().then(() => {
|
|
4474
|
+
$xeTable.handleCustomStyle()
|
|
4475
|
+
})
|
|
4476
|
+
}
|
|
4477
|
+
}
|
|
4478
|
+
}
|
|
4479
|
+
|
|
4435
4480
|
const tableMethods: any = {
|
|
4436
4481
|
callSlot (slotFunc: any, params: any, h: any, vNodes: any) {
|
|
4437
4482
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -7151,6 +7196,11 @@ const tableMethods: any = {
|
|
|
7151
7196
|
$xeTable.closeFilter()
|
|
7152
7197
|
$xeTable.closeMenu()
|
|
7153
7198
|
},
|
|
7199
|
+
handleGlobalScrollEvent (evnt: MouseEvent) {
|
|
7200
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7201
|
+
|
|
7202
|
+
reUpdateCustomStyleEvent($xeTable, evnt)
|
|
7203
|
+
},
|
|
7154
7204
|
/**
|
|
7155
7205
|
* 全局滚动事件
|
|
7156
7206
|
*/
|
|
@@ -7158,7 +7208,9 @@ const tableMethods: any = {
|
|
|
7158
7208
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7159
7209
|
|
|
7160
7210
|
$xeTable.closeTooltip()
|
|
7161
|
-
$xeTable.closeMenu
|
|
7211
|
+
if ($xeTable.closeMenu) {
|
|
7212
|
+
$xeTable.closeMenu()
|
|
7213
|
+
}
|
|
7162
7214
|
},
|
|
7163
7215
|
/**
|
|
7164
7216
|
* 表格键盘事件
|
|
@@ -7217,8 +7269,8 @@ const tableMethods: any = {
|
|
|
7217
7269
|
if (internalData.isActivated) {
|
|
7218
7270
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
7219
7271
|
const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props
|
|
7220
|
-
const { ctxMenuStore, editStore
|
|
7221
|
-
const { afterFullData, visibleColumn } = internalData
|
|
7272
|
+
const { ctxMenuStore, editStore } = reactData
|
|
7273
|
+
const { afterFullData, visibleColumn, currentRow } = internalData
|
|
7222
7274
|
const isContentMenu = $xeTable.computeIsContentMenu
|
|
7223
7275
|
const bodyMenu = $xeTable.computeBodyMenu
|
|
7224
7276
|
const keyboardOpts = $xeTable.computeKeyboardOpts
|
|
@@ -8614,14 +8666,14 @@ const tableMethods: any = {
|
|
|
8614
8666
|
let newValue = row
|
|
8615
8667
|
let isChange = oldValue !== newValue
|
|
8616
8668
|
if (strict) {
|
|
8617
|
-
handleCheckedRadioRow($xeTable, newValue)
|
|
8669
|
+
handleCheckedRadioRow($xeTable, newValue, false)
|
|
8618
8670
|
} else {
|
|
8619
8671
|
if (oldValue === newValue) {
|
|
8620
8672
|
newValue = null
|
|
8621
8673
|
}
|
|
8622
8674
|
isChange = oldValue !== newValue
|
|
8623
8675
|
if (isChange && newValue) {
|
|
8624
|
-
handleCheckedRadioRow($xeTable, newValue)
|
|
8676
|
+
handleCheckedRadioRow($xeTable, newValue, false)
|
|
8625
8677
|
} else {
|
|
8626
8678
|
newValue = null
|
|
8627
8679
|
$xeTable.clearRadioRow()
|
|
@@ -8672,9 +8724,9 @@ const tableMethods: any = {
|
|
|
8672
8724
|
},
|
|
8673
8725
|
triggerCurrentRowEvent (evnt: Event, params: any) {
|
|
8674
8726
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8675
|
-
const
|
|
8727
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
8676
8728
|
|
|
8677
|
-
const { currentRow: oldValue } =
|
|
8729
|
+
const { currentRow: oldValue } = internalData
|
|
8678
8730
|
const rowOpts = $xeTable.computeRowOpts
|
|
8679
8731
|
const currentRowOpts = $xeTable.computeCurrentRowOpts
|
|
8680
8732
|
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod as any
|
|
@@ -8781,12 +8833,11 @@ const tableMethods: any = {
|
|
|
8781
8833
|
*/
|
|
8782
8834
|
clearCurrentRow () {
|
|
8783
8835
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8784
|
-
const reactData = $xeTable as unknown as TableReactData
|
|
8785
8836
|
const internalData = $xeTable as unknown as TableInternalData
|
|
8786
8837
|
|
|
8787
8838
|
const $xeGanttView = internalData.xeGanttView
|
|
8788
8839
|
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
8789
|
-
|
|
8840
|
+
internalData.currentRow = null
|
|
8790
8841
|
internalData.hoverRow = null
|
|
8791
8842
|
if (el) {
|
|
8792
8843
|
XEUtils.arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'))
|
|
@@ -8809,11 +8860,9 @@ const tableMethods: any = {
|
|
|
8809
8860
|
getCurrentRecord (isFull?: boolean) {
|
|
8810
8861
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
8811
8862
|
const props = $xeTable
|
|
8812
|
-
const reactData = $xeTable as unknown as TableReactData
|
|
8813
8863
|
const internalData = $xeTable as unknown as TableInternalData
|
|
8814
8864
|
|
|
8815
|
-
const { currentRow } =
|
|
8816
|
-
const { fullDataRowIdData, afterFullRowMaps } = internalData
|
|
8865
|
+
const { fullDataRowIdData, afterFullRowMaps, currentRow } = internalData
|
|
8817
8866
|
const rowOpts = $xeTable.computeRowOpts
|
|
8818
8867
|
if (rowOpts.isCurrent || props.highlightCurrentRow) {
|
|
8819
8868
|
const rowid = getRowid($xeTable, currentRow)
|
|
@@ -12310,7 +12359,7 @@ const tableMethods: any = {
|
|
|
12310
12359
|
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : ''
|
|
12311
12360
|
}
|
|
12312
12361
|
reactData.scrollYTop = scrollYTop
|
|
12313
|
-
reactData.scrollYHeight = ySpaceHeight
|
|
12362
|
+
reactData.scrollYHeight = isScrollYBig ? sYHeight : ySpaceHeight
|
|
12314
12363
|
reactData.isScrollYBig = isScrollYBig
|
|
12315
12364
|
|
|
12316
12365
|
calcScrollbar($xeTable)
|
|
@@ -1953,6 +1953,7 @@ export default {
|
|
|
1953
1953
|
globalEvents.on($xeTable, 'mousewheel', this.handleGlobalMousewheelEvent)
|
|
1954
1954
|
globalEvents.on($xeTable, 'keydown', this.handleGlobalKeydownEvent)
|
|
1955
1955
|
globalEvents.on($xeTable, 'resize', this.handleGlobalResizeEvent)
|
|
1956
|
+
globalEvents.on($xeTable, 'scroll', this.handleGlobalScrollEvent)
|
|
1956
1957
|
globalEvents.on($xeTable, 'contextmenu', this.handleGlobalContextmenuEvent)
|
|
1957
1958
|
$xeTable.preventEvent(null, 'created')
|
|
1958
1959
|
},
|
|
@@ -2096,6 +2097,10 @@ export default {
|
|
|
2096
2097
|
if (popupWrapperEl && popupWrapperEl.parentElement) {
|
|
2097
2098
|
popupWrapperEl.parentElement.removeChild(popupWrapperEl)
|
|
2098
2099
|
}
|
|
2100
|
+
const customPopupToElem = $xeTable.$refs.refCustomPopupToElem as HTMLDivElement
|
|
2101
|
+
if (customPopupToElem && customPopupToElem.parentElement) {
|
|
2102
|
+
customPopupToElem.parentElement.removeChild(customPopupToElem)
|
|
2103
|
+
}
|
|
2099
2104
|
|
|
2100
2105
|
const tableViewportEl = $xeTable.$refs.refTableViewportElem as HTMLDivElement
|
|
2101
2106
|
if (tableViewportEl) {
|
|
@@ -2118,6 +2123,7 @@ export default {
|
|
|
2118
2123
|
globalEvents.off($xeTable, 'mousewheel')
|
|
2119
2124
|
globalEvents.off($xeTable, 'keydown')
|
|
2120
2125
|
globalEvents.off($xeTable, 'resize')
|
|
2126
|
+
globalEvents.off($xeTable, 'scroll')
|
|
2121
2127
|
globalEvents.off($xeTable, 'contextmenu')
|
|
2122
2128
|
|
|
2123
2129
|
$xeTable.preventEvent(null, 'beforeDestroy')
|
|
@@ -2175,8 +2181,6 @@ export default {
|
|
|
2175
2181
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
2176
2182
|
const scrollbarXToTop = $xeTable.computeScrollbarXToTop
|
|
2177
2183
|
const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft
|
|
2178
|
-
const customSimpleMode = $xeTable.computeCustomSimpleMode
|
|
2179
|
-
const showCustomSimpleOutside = customSimpleMode === 'outside'
|
|
2180
2184
|
const { isCrossTableDrag } = rowDragOpts
|
|
2181
2185
|
const tbOns: {
|
|
2182
2186
|
contextmenu: (...args: any[]) => void
|
|
@@ -2329,18 +2333,6 @@ export default {
|
|
|
2329
2333
|
})
|
|
2330
2334
|
]
|
|
2331
2335
|
: []),
|
|
2332
|
-
/**
|
|
2333
|
-
* 自定义列
|
|
2334
|
-
*/
|
|
2335
|
-
!showCustomSimpleOutside && initStore.custom
|
|
2336
|
-
? h(TableCustomPanelComponent, {
|
|
2337
|
-
key: 'cs',
|
|
2338
|
-
ref: 'refTableCustom',
|
|
2339
|
-
props: {
|
|
2340
|
-
customStore
|
|
2341
|
-
}
|
|
2342
|
-
})
|
|
2343
|
-
: renderEmptyElement($xeTable),
|
|
2344
2336
|
/**
|
|
2345
2337
|
* 加载中
|
|
2346
2338
|
*/
|
|
@@ -2373,15 +2365,16 @@ export default {
|
|
|
2373
2365
|
])
|
|
2374
2366
|
]),
|
|
2375
2367
|
h('div', {
|
|
2376
|
-
key: '
|
|
2368
|
+
key: 'fpw',
|
|
2369
|
+
ref: 'refCustomContainerElem'
|
|
2377
2370
|
}, [
|
|
2378
2371
|
h('div', {
|
|
2379
|
-
ref: '
|
|
2372
|
+
ref: 'refCustomPopupToElem'
|
|
2380
2373
|
}, [
|
|
2381
2374
|
/**
|
|
2382
2375
|
* 自定义列
|
|
2383
2376
|
*/
|
|
2384
|
-
|
|
2377
|
+
initStore.custom
|
|
2385
2378
|
? h(TableCustomPanelComponent, {
|
|
2386
2379
|
key: 'cs',
|
|
2387
2380
|
ref: 'refTableCustom',
|
|
@@ -2389,7 +2382,15 @@ export default {
|
|
|
2389
2382
|
customStore
|
|
2390
2383
|
}
|
|
2391
2384
|
})
|
|
2392
|
-
: renderEmptyElement($xeTable)
|
|
2385
|
+
: renderEmptyElement($xeTable)
|
|
2386
|
+
])
|
|
2387
|
+
]),
|
|
2388
|
+
h('div', {
|
|
2389
|
+
key: 'tpw'
|
|
2390
|
+
}, [
|
|
2391
|
+
h('div', {
|
|
2392
|
+
ref: 'refPopupWrapperElem'
|
|
2393
|
+
}, [
|
|
2393
2394
|
/**
|
|
2394
2395
|
* 筛选
|
|
2395
2396
|
*/
|
|
@@ -90,6 +90,9 @@ export function createInternalData (): TableInternalData {
|
|
|
90
90
|
fullColumnIdData: {},
|
|
91
91
|
fullColumnFieldData: {},
|
|
92
92
|
|
|
93
|
+
// 当前行
|
|
94
|
+
currentRow: null,
|
|
95
|
+
|
|
93
96
|
// 合并表头单元格的数据
|
|
94
97
|
mergeHeaderList: [],
|
|
95
98
|
mergeHeaderMaps: {},
|
|
@@ -142,6 +145,7 @@ export function createInternalData (): TableInternalData {
|
|
|
142
145
|
|
|
143
146
|
teleportToWrapperElem: null,
|
|
144
147
|
popupToWrapperElem: null,
|
|
148
|
+
customPopupToElem: null,
|
|
145
149
|
|
|
146
150
|
lastSTime: 0,
|
|
147
151
|
|
|
@@ -188,8 +192,6 @@ export function createReactData (): TableReactData {
|
|
|
188
192
|
isAllSelected: false,
|
|
189
193
|
// 复选框属性,有选中且非全选状态
|
|
190
194
|
isIndeterminate: false,
|
|
191
|
-
// 当前行
|
|
192
|
-
currentRow: null,
|
|
193
195
|
// 单选框属性,选中列
|
|
194
196
|
currentColumn: null,
|
|
195
197
|
// 单选框属性,选中行
|
|
@@ -225,7 +227,7 @@ export function createReactData (): TableReactData {
|
|
|
225
227
|
activeWrapper: false,
|
|
226
228
|
visible: false,
|
|
227
229
|
maxHeight: null,
|
|
228
|
-
|
|
230
|
+
popupStyle: {},
|
|
229
231
|
oldSortMaps: {},
|
|
230
232
|
oldFixedMaps: {},
|
|
231
233
|
oldVisibleMaps: {}
|
|
@@ -395,6 +397,8 @@ export function createReactData (): TableReactData {
|
|
|
395
397
|
resizeWidthFlag: 1,
|
|
396
398
|
|
|
397
399
|
isCustomStatus: false,
|
|
400
|
+
isCustomDragStatus: true,
|
|
401
|
+
ctPopupFlag: 1,
|
|
398
402
|
|
|
399
403
|
isCrossDragRow: false,
|
|
400
404
|
dragRow: null,
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
text-align: left;
|
|
65
65
|
background-color: var(--vxe-ui-layout-background-color);
|
|
66
66
|
z-index: 19;
|
|
67
|
+
color: var(--vxe-ui-font-color);
|
|
67
68
|
border: 1px solid var(--vxe-ui-table-border-color);
|
|
68
69
|
border-radius: var(--vxe-ui-border-radius);
|
|
69
70
|
box-shadow: var(--vxe-ui-base-popup-box-shadow);
|
|
@@ -525,4 +526,17 @@
|
|
|
525
526
|
}
|
|
526
527
|
.vxe-table-custom-popup--table-col-fixed {
|
|
527
528
|
width: 200px;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.vxe-table-custom-wrapper {
|
|
532
|
+
font-size: var(--vxe-ui-font-size-default);
|
|
533
|
+
&.size--medium {
|
|
534
|
+
font-size: var(--vxe-ui-font-size-medium);
|
|
535
|
+
}
|
|
536
|
+
&.size--small {
|
|
537
|
+
font-size: var(--vxe-ui-font-size-small);
|
|
538
|
+
}
|
|
539
|
+
&.size--mini {
|
|
540
|
+
font-size: var(--vxe-ui-font-size-mini);
|
|
541
|
+
}
|
|
528
542
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|