vxe-table 3.12.9 → 3.12.10-beta.1

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.
Files changed (90) hide show
  1. package/es/grid/src/grid.js +6 -1
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/locale/lang/ko-KR.js +515 -515
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/table/module/export/mixin.js +3 -3
  8. package/es/table/module/filter/mixin.js +3 -3
  9. package/es/table/module/keyboard/mixin.js +4 -4
  10. package/es/table/module/menu/mixin.js +2 -2
  11. package/es/table/module/validator/mixin.js +2 -2
  12. package/es/table/src/body.js +247 -351
  13. package/es/table/src/footer.js +135 -154
  14. package/es/table/src/header.js +120 -100
  15. package/es/table/src/methods.js +1192 -797
  16. package/es/table/src/props.js +9 -3
  17. package/es/table/src/table.js +187 -103
  18. package/es/table/src/util.js +16 -7
  19. package/es/table/style.css +146 -63
  20. package/es/table/style.min.css +1 -1
  21. package/es/ui/index.js +14 -4
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-table/style.css +146 -63
  24. package/es/vxe-table/style.min.css +1 -1
  25. package/lib/grid/src/grid.js +4 -1
  26. package/lib/grid/src/grid.min.js +1 -1
  27. package/lib/index.css +1 -1
  28. package/lib/index.min.css +1 -1
  29. package/lib/index.umd.js +1917 -1550
  30. package/lib/index.umd.min.js +1 -1
  31. package/lib/locale/lang/ko-KR.js +515 -515
  32. package/lib/locale/lang/ko-KR.min.js +1 -1
  33. package/lib/locale/lang/ko-KR.umd.js +515 -515
  34. package/lib/style.css +1 -1
  35. package/lib/style.min.css +1 -1
  36. package/lib/table/module/export/mixin.js +3 -3
  37. package/lib/table/module/export/mixin.min.js +1 -1
  38. package/lib/table/module/filter/mixin.js +4 -4
  39. package/lib/table/module/filter/mixin.min.js +1 -1
  40. package/lib/table/module/keyboard/mixin.js +5 -5
  41. package/lib/table/module/keyboard/mixin.min.js +1 -1
  42. package/lib/table/module/menu/mixin.js +2 -2
  43. package/lib/table/module/menu/mixin.min.js +1 -1
  44. package/lib/table/module/validator/mixin.js +2 -2
  45. package/lib/table/module/validator/mixin.min.js +1 -1
  46. package/lib/table/src/body.js +185 -365
  47. package/lib/table/src/body.min.js +1 -1
  48. package/lib/table/src/footer.js +124 -151
  49. package/lib/table/src/footer.min.js +1 -1
  50. package/lib/table/src/header.js +97 -74
  51. package/lib/table/src/header.min.js +1 -1
  52. package/lib/table/src/methods.js +1282 -840
  53. package/lib/table/src/methods.min.js +1 -1
  54. package/lib/table/src/props.js +9 -3
  55. package/lib/table/src/props.min.js +1 -1
  56. package/lib/table/src/table.js +171 -90
  57. package/lib/table/src/table.min.js +1 -1
  58. package/lib/table/src/util.js +17 -7
  59. package/lib/table/src/util.min.js +1 -1
  60. package/lib/table/style/style.css +146 -63
  61. package/lib/table/style/style.min.css +1 -1
  62. package/lib/ui/index.js +14 -4
  63. package/lib/ui/index.min.js +1 -1
  64. package/lib/ui/src/log.js +1 -1
  65. package/lib/ui/src/log.min.js +1 -1
  66. package/lib/vxe-table/style/style.css +146 -63
  67. package/lib/vxe-table/style/style.min.css +1 -1
  68. package/package.json +2 -2
  69. package/packages/grid/src/grid.ts +6 -1
  70. package/packages/locale/lang/ko-KR.ts +515 -515
  71. package/packages/table/module/export/mixin.ts +3 -3
  72. package/packages/table/module/filter/mixin.ts +3 -3
  73. package/packages/table/module/keyboard/mixin.ts +4 -4
  74. package/packages/table/module/menu/mixin.ts +2 -2
  75. package/packages/table/module/validator/mixin.ts +2 -2
  76. package/packages/table/src/body.ts +281 -427
  77. package/packages/table/src/footer.ts +148 -164
  78. package/packages/table/src/header.ts +135 -111
  79. package/packages/table/src/methods.ts +1271 -858
  80. package/packages/table/src/props.ts +9 -3
  81. package/packages/table/src/table.ts +195 -146
  82. package/packages/table/src/util.ts +17 -7
  83. package/packages/ui/index.ts +13 -3
  84. package/styles/components/table.scss +164 -74
  85. /package/es/{iconfont.1736414871619.ttf → iconfont.1736690657500.ttf} +0 -0
  86. /package/es/{iconfont.1736414871619.woff → iconfont.1736690657500.woff} +0 -0
  87. /package/es/{iconfont.1736414871619.woff2 → iconfont.1736690657500.woff2} +0 -0
  88. /package/lib/{iconfont.1736414871619.ttf → iconfont.1736690657500.ttf} +0 -0
  89. /package/lib/{iconfont.1736414871619.woff → iconfont.1736690657500.woff} +0 -0
  90. /package/lib/{iconfont.1736414871619.woff2 → iconfont.1736690657500.woff2} +0 -0
@@ -1,23 +1,29 @@
1
- import { CreateElement } from 'vue'
1
+ import { PropType, CreateElement } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { VxeUI } from '../../ui'
4
4
  import { getClass } from '../../ui/src/utils'
5
5
  import { getOffsetPos, hasClass, addClass, removeClass } from '../../ui/src/dom'
6
6
  import { convertHeaderColumnToRows, getColReMinWidth } from './util'
7
7
 
8
- import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes } from '../../../types'
8
+ import type { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes, TableReactData, TableInternalData, VxeComponentStyleType } from '../../../types'
9
9
 
10
10
  const { getI18n, renderer, renderEmptyElement } = VxeUI
11
11
 
12
12
  const cellType = 'header'
13
13
 
14
- const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
15
- const $xeTable = _vm.$parent
14
+ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
15
+ const props = _vm
16
+ const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
16
17
  const $xeGrid = $xeTable.xegrid
18
+ const tableProps = $xeTable
19
+ const tableReactData = $xeTable as unknown as TableReactData
20
+ const tableInternalData = $xeTable as unknown as TableInternalData
17
21
 
18
- const { fixedType } = _vm
19
-
20
- const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, currentColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, mouseConfig, columnOpts } = $xeTable
22
+ const { fixedType } = props
23
+ const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps
24
+ const { currentColumn, scrollXLoad, scrollYLoad, overflowX } = tableReactData
25
+ const { scrollXStore } = tableInternalData
26
+ const columnOpts = $xeTable.computeColumnOpts
21
27
  const columnDragOpts = $xeTable.computeColumnDragOpts
22
28
  const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
23
29
  return cols.map((column: any, $columnIndex: any) => {
@@ -76,6 +82,11 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
76
82
  }
77
83
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
78
84
 
85
+ let isPreLoadStatus = false
86
+ if (scrollXLoad && !isGroup && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex || _columnIndex > scrollXStore.visibleEndIndex)) {
87
+ isPreLoadStatus = true
88
+ }
89
+
79
90
  return h('th', {
80
91
  class: ['vxe-header--column', colid, {
81
92
  [`col--${headAlign}`]: headAlign,
@@ -94,7 +105,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
94
105
  'col--current': currentColumn === column
95
106
  }, getClass(headerClassName, params), getClass(headerCellClassName, params)],
96
107
  attrs: thAttrs,
97
- style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null,
108
+ style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) as VxeComponentStyleType : undefined,
98
109
  on: thOns,
99
110
  key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
100
111
  }, [
@@ -104,7 +115,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
104
115
  'c--tooltip': showTooltip,
105
116
  'c--ellipsis': showEllipsis
106
117
  }]
107
- }, column.renderHeader(h, params)),
118
+ }, isPreLoadStatus || (isOptimizeMode && fixedHiddenColumn) ? [] : column.renderHeader(h, params)),
108
119
  /**
109
120
  * 列宽拖动
110
121
  */
@@ -120,27 +131,22 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
120
131
  })
121
132
  : null
122
133
  ])
123
- }).concat(scrollbarWidth
124
- ? [
125
- h('th', {
126
- key: `gr${$rowIndex}`,
127
- class: 'vxe-header--gutter col--gutter'
128
- })
129
- ]
130
- : [])
134
+ })
131
135
  }
132
136
 
133
- function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
134
- const $xeTable = _vm.$parent
137
+ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: any[]) {
138
+ const props = _vm
139
+ const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
135
140
  const tableProps = $xeTable
141
+ const tableReactData = $xeTable as unknown as TableReactData
136
142
 
137
- const { fixedType } = _vm
143
+ const { fixedType } = props
138
144
 
139
145
  const columnOpts = $xeTable.computeColumnOpts
140
146
  const columnDragOpts = $xeTable.computeColumnDragOpts
141
147
 
142
148
  const { headerRowClassName, headerRowStyle } = tableProps
143
- const { isDragColMove } = $xeTable
149
+ const { isDragColMove } = tableReactData
144
150
 
145
151
  return headerGroups.map((cols: any, $rowIndex: any) => {
146
152
  const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: cellType }
@@ -157,7 +163,7 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
157
163
  ],
158
164
  style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
159
165
  }
160
- }, renderRows(h, _vm, cols, $rowIndex))
166
+ }, renderRows(h, _vm, isGroup, isOptimizeMode, cols, $rowIndex))
161
167
  }
162
168
  return h('tr', {
163
169
  key: $rowIndex,
@@ -165,20 +171,22 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
165
171
  'vxe-header--row',
166
172
  headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''
167
173
  ],
168
- style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
169
- }, renderRows(h, _vm, cols, $rowIndex))
174
+ style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) as VxeComponentStyleType : undefined
175
+ }, renderRows(h, _vm, isGroup, isOptimizeMode, cols, $rowIndex))
170
176
  })
171
177
  }
172
178
 
173
179
  export default {
174
180
  name: 'VxeTableHeader',
175
181
  props: {
176
- tableData: Array,
177
- tableColumn: Array,
178
- tableGroupColumn: Array,
179
- fixedColumn: Array,
180
- size: String,
181
- fixedType: String
182
+ tableData: Array as PropType<any[]>,
183
+ tableColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
184
+ tableGroupColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
185
+ fixedColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
186
+ fixedType: {
187
+ type: String as PropType<'right' | 'left' | ''>,
188
+ default: null
189
+ }
182
190
  },
183
191
  data () {
184
192
  return {
@@ -194,21 +202,32 @@ export default {
194
202
  this.uploadColumn()
195
203
  },
196
204
  mounted () {
197
- const { $parent: $xetable, $el, $refs, fixedType } = this
198
- const { elemStore } = $xetable
205
+ const _vm = this
206
+ const props = _vm
207
+ const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
208
+ const internalData = $xeTable as unknown as TableInternalData
209
+
210
+ const { fixedType } = props
211
+ const { elemStore } = internalData
199
212
  const prefix = `${fixedType || 'main'}-header-`
200
- elemStore[`${prefix}wrapper`] = $el
201
- elemStore[`${prefix}table`] = $refs.table
202
- elemStore[`${prefix}colgroup`] = $refs.colgroup
203
- elemStore[`${prefix}list`] = $refs.thead
204
- elemStore[`${prefix}xSpace`] = $refs.xSpace
205
- elemStore[`${prefix}repair`] = $refs.repair
213
+ elemStore[`${prefix}wrapper`] = _vm.$refs.refElem
214
+ elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll
215
+ elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable
216
+ elemStore[`${prefix}colgroup`] = _vm.$refs.refHeaderColgroup
217
+ elemStore[`${prefix}list`] = _vm.$refs.refHeaderTHead
218
+ elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace
219
+ elemStore[`${prefix}repair`] = _vm.$refs.refHeaderBorderRepair
206
220
  },
207
221
  destroyed () {
208
- const { $parent: $xetable, fixedType } = this
209
- const { elemStore } = $xetable
222
+ const props = this
223
+ const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
224
+ const internalData = $xeTable as unknown as TableInternalData
225
+
226
+ const { fixedType } = props
227
+ const { elemStore } = internalData
210
228
  const prefix = `${fixedType || 'main'}-header-`
211
229
  elemStore[`${prefix}wrapper`] = null
230
+ elemStore[`${prefix}scroll`] = null
212
231
  elemStore[`${prefix}table`] = null
213
232
  elemStore[`${prefix}colgroup`] = null
214
233
  elemStore[`${prefix}list`] = null
@@ -217,36 +236,40 @@ export default {
217
236
  },
218
237
  render (h: CreateElement) {
219
238
  const props = this
220
- const $xeTable = this.$parent
239
+ const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
221
240
  const tableProps = $xeTable
222
- const tableReactData = $xeTable
223
- const tableInternalData = $xeTable
241
+ const tableReactData = $xeTable as unknown as TableReactData
242
+ const tableInternalData = $xeTable as unknown as TableInternalData
224
243
 
225
- const { tId } = $xeTable
244
+ const { xID } = $xeTable
226
245
  const { fixedType, fixedColumn, tableColumn } = props
227
246
  const { headerColumn } = this
228
247
 
229
248
  const { showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps
230
- const { isGroup, scrollXLoad, scrollYLoad, scrollbarWidth, dragCol } = tableReactData
249
+ const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData
231
250
  const { visibleColumn, fullColumnIdData } = tableInternalData
232
251
 
233
- let renderHeaderList: VxeTableDefines.ColumnInfo[][] = headerColumn
234
- let renderColumnList: VxeTableDefines.ColumnInfo[] = tableColumn
252
+ let renderHeaderList = headerColumn as VxeTableDefines.ColumnInfo[][]
253
+ let renderColumnList = tableColumn as VxeTableDefines.ColumnInfo[]
254
+ let isOptimizeMode = false
235
255
 
236
256
  if (isGroup) {
237
257
  renderColumnList = visibleColumn
238
258
  } else {
239
- if (fixedType) {
240
- // 如果是使用优化模式
241
- if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
259
+ // 如果是使用优化模式
260
+ if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
261
+ if (spanMethod || footerSpanMethod) {
242
262
  // 如果不支持优化模式
243
- if (spanMethod || footerSpanMethod) {
244
- renderColumnList = visibleColumn
245
- } else {
246
- renderColumnList = fixedColumn || []
247
- }
248
263
  } else {
249
- renderColumnList = visibleColumn
264
+ isOptimizeMode = true
265
+ }
266
+ }
267
+
268
+ if (fixedType) {
269
+ renderColumnList = visibleColumn
270
+ // 如果是使用优化模式
271
+ if (isOptimizeMode) {
272
+ renderColumnList = fixedColumn || []
250
273
  }
251
274
  }
252
275
  renderHeaderList = [renderColumnList]
@@ -266,7 +289,6 @@ export default {
266
289
  if (firstColRest && lastColRest) {
267
290
  const fcIndex = firstColRest._index
268
291
  const lcIndex = lastColRest._index
269
- console.log(dragCol.id, dcIndex, fcIndex, lcIndex, renderColumnList.length)
270
292
  if (dcIndex < fcIndex) {
271
293
  renderColumnList = [dragCol].concat(renderColumnList)
272
294
  renderHeaderList = [[dragCol].concat(renderHeaderList[0])].concat(renderHeaderList.slice(1))
@@ -274,7 +296,6 @@ export default {
274
296
  renderColumnList = renderColumnList.concat([dragCol])
275
297
  renderHeaderList = [renderHeaderList[0].concat([dragCol])].concat(renderHeaderList.slice(1))
276
298
  }
277
- console.log(renderColumnList.length)
278
299
  }
279
300
  }
280
301
  }
@@ -282,62 +303,65 @@ export default {
282
303
  }
283
304
 
284
305
  return h('div', {
306
+ ref: 'refElem',
285
307
  class: ['vxe-table--header-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
286
308
  attrs: {
287
- xid: tId
309
+ xid: xID
288
310
  }
289
311
  }, [
290
- fixedType
291
- ? renderEmptyElement($xeTable)
292
- : h('div', {
293
- class: 'vxe-body--x-space',
294
- ref: 'xSpace'
295
- }),
296
- h('table', {
297
- class: 'vxe-table--header',
298
- attrs: {
299
- xid: tId,
300
- cellspacing: 0,
301
- cellpadding: 0,
302
- border: 0
303
- },
304
- ref: 'table'
312
+ h('div', {
313
+ ref: 'refHeaderScroll',
314
+ class: 'vxe-table--header-inner-wrapper',
315
+ on: {
316
+ scroll (evnt: Event) {
317
+ $xeTable.triggerHeaderScrollEvent(evnt, fixedType)
318
+ }
319
+ }
305
320
  }, [
321
+ fixedType
322
+ ? renderEmptyElement($xeTable)
323
+ : h('div', {
324
+ ref: 'refHeaderXSpace',
325
+ class: 'vxe-body--x-space'
326
+ }),
327
+ h('table', {
328
+ ref: 'refHeaderTable',
329
+ class: 'vxe-table--header',
330
+ attrs: {
331
+ xid: xID,
332
+ cellspacing: 0,
333
+ cellpadding: 0,
334
+ border: 0
335
+ }
336
+ }, [
306
337
  /**
307
338
  * 列宽
308
339
  */
309
- h('colgroup', {
310
- ref: 'colgroup'
311
- }, renderColumnList.map((column: any, $columnIndex: any) => {
312
- return h('col', {
313
- attrs: {
314
- name: column.id
315
- },
316
- key: $columnIndex
317
- })
318
- }).concat(scrollbarWidth
319
- ? [
320
- h('col', {
321
- attrs: {
322
- name: 'col_gutter'
323
- }
324
- })
325
- ]
326
- : [])),
340
+ h('colgroup', {
341
+ ref: 'refHeaderColgroup'
342
+ }, renderColumnList.map((column, $columnIndex) => {
343
+ return h('col', {
344
+ attrs: {
345
+ name: column.id
346
+ },
347
+ key: $columnIndex
348
+ })
349
+ })),
350
+ /**
351
+ * 头部
352
+ */
353
+ h('thead', {
354
+ ref: 'refHeaderTHead'
355
+ }, renderHeads(h, this, isGroup, isOptimizeMode, renderHeaderList))
356
+ ]),
327
357
  /**
328
- * 头部
358
+ * 其他
329
359
  */
330
- h('thead', {
331
- ref: 'thead'
332
- }, renderHeads(h, this, renderHeaderList))
333
- ]),
334
- /**
335
- * 其他
336
- */
337
- h('div', {
338
- class: 'vxe-table--header-border-line',
339
- ref: 'repair'
340
- })
360
+ h('div', {
361
+ ref: 'refHeaderBorderRepair',
362
+ class: 'vxe-table--header-border-line'
363
+ })
364
+ ])
341
365
  ])
342
366
  },
343
367
  methods: {
@@ -352,9 +376,9 @@ export default {
352
376
  const { column } = params
353
377
  const { $parent: $xetable, fixedType } = this
354
378
  const { visibleColumn } = tableInternalData
355
- const { tableBody, leftContainer, rightContainer } = $xetable.$refs
379
+ const { refTableBody, refLeftContainer, refRightContainer } = $xetable.$refs
356
380
  const tableEl = $xeTable.$el as HTMLDivElement
357
- const resizeBarElem = $xetable.$refs.resizeBar as HTMLDivElement
381
+ const resizeBarElem = $xetable.$refs.refCellResizeBar as HTMLDivElement
358
382
  const resizeTipElem = $xetable.$refs.refCellResizeTip as HTMLDivElement
359
383
  const wrapperElem = this.$el as HTMLDivElement
360
384
  const { clientX: dragClientX } = evnt
@@ -363,7 +387,7 @@ export default {
363
387
  const cellParams = Object.assign(params, { cell })
364
388
  const resizableOpts = $xeTable.computeResizableOpts
365
389
  let dragLeft = 0
366
- const tableBodyElem = tableBody.$el
390
+ const tableBodyElem = refTableBody.$el
367
391
  const pos = getOffsetPos(dragBtnElem, tableEl)
368
392
  const dragBtnWidth = dragBtnElem.clientWidth
369
393
  const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2)
@@ -388,8 +412,8 @@ export default {
388
412
  }
389
413
  tempCellElem = tempCellElem[siblingProp] as HTMLTableCellElement
390
414
  }
391
- if (isRightFixed && rightContainer) {
392
- dragPosLeft = rightContainer.offsetLeft + fixedOffsetWidth
415
+ if (isRightFixed && refRightContainer) {
416
+ dragPosLeft = refRightContainer.offsetLeft + fixedOffsetWidth
393
417
  }
394
418
  }
395
419
 
@@ -402,10 +426,10 @@ export default {
402
426
  const scrollLeft = fixedType ? 0 : tableBodyElem.scrollLeft
403
427
  if (isLeftFixed) {
404
428
  // 左固定列(不允许超过右侧固定列、不允许超过右边距)
405
- left = Math.min(left, (rightContainer ? rightContainer.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval)
429
+ left = Math.min(left, (refRightContainer ? refRightContainer.offsetLeft : tableBodyElem.clientWidth) - fixedOffsetWidth - minInterval)
406
430
  } else if (isRightFixed) {
407
431
  // 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
408
- dragMinLeft = (leftContainer ? leftContainer.clientWidth : 0) + fixedOffsetWidth + minInterval
432
+ dragMinLeft = (refLeftContainer ? refLeftContainer.clientWidth : 0) + fixedOffsetWidth + minInterval
409
433
  left = Math.min(left, dragPosLeft + cell.clientWidth - minInterval)
410
434
  } else {
411
435
  dragMinLeft = Math.max(tableBodyElem.scrollLeft, dragMinLeft)