vxe-table 3.12.15 → 3.12.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.
@@ -6967,6 +6967,19 @@ const Methods = {
6967
6967
  reactData.pendingRowMaps = pendingMaps
6968
6968
  return $xeTable.$nextTick()
6969
6969
  },
6970
+ hasPendingByRow (row: any) {
6971
+ const $xeTable = this
6972
+
6973
+ return $xeTable.isPendingByRow(row)
6974
+ },
6975
+ isPendingByRow (row: any) {
6976
+ const $xeTable = this
6977
+ const reactData = $xeTable
6978
+
6979
+ const { pendingRowMaps } = reactData
6980
+ const rowid = getRowid($xeTable, row)
6981
+ return !!pendingRowMaps[rowid]
6982
+ },
6970
6983
  getPendingRecords () {
6971
6984
  const $xeTable = this
6972
6985
  const reactData = $xeTable
@@ -6982,11 +6995,6 @@ const Methods = {
6982
6995
  })
6983
6996
  return insertRecords
6984
6997
  },
6985
- hasPendingByRow (row: any) {
6986
- const { pendingRowMaps } = this
6987
- const rowid = getRowid(this, row)
6988
- return !!pendingRowMaps[rowid]
6989
- },
6990
6998
  clearPendingRow () {
6991
6999
  this.pendingRowMaps = {}
6992
7000
  return this.$nextTick()
@@ -7954,8 +7962,10 @@ const Methods = {
7954
7962
  },
7955
7963
  triggerBodyScrollEvent (evnt: Event, fixedType: '' | 'left' | 'right') {
7956
7964
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
7965
+ const reactData = $xeTable as unknown as TableReactData
7957
7966
  const internalData = $xeTable as unknown as TableInternalData
7958
7967
 
7968
+ const { scrollYLoad, scrollXLoad } = reactData
7959
7969
  const { elemStore, intoRunScroll, lastScrollTop, lastScrollLeft, inWheelScroll, inVirtualScroll, inHeaderScroll, inBodyScroll, scrollRenderType, inFooterScroll } = internalData
7960
7970
  const xHandleEl = $xeTable.$refs.refScrollXHandleElem as HTMLDivElement
7961
7971
  const yHandleEl = $xeTable.$refs.refScrollYHandleElem as HTMLDivElement
@@ -8010,13 +8020,17 @@ const Methods = {
8010
8020
  setScrollTop(rightScrollElem, scrollTop)
8011
8021
  }
8012
8022
  setScrollTop(yHandleEl, scrollTop)
8013
- $xeTable.triggerScrollYEvent(evnt)
8023
+ if (scrollYLoad) {
8024
+ $xeTable.triggerScrollYEvent(evnt)
8025
+ }
8014
8026
  }
8015
8027
  if (isRollX) {
8016
8028
  setScrollLeft(xHandleEl, scrollLeft)
8017
8029
  setScrollLeft(headerScrollElem, scrollLeft)
8018
8030
  setScrollLeft(footerScrollElem, scrollLeft)
8019
- $xeTable.triggerScrollXEvent(evnt)
8031
+ if (scrollXLoad) {
8032
+ $xeTable.triggerScrollXEvent(evnt)
8033
+ }
8020
8034
  }
8021
8035
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
8022
8036
  type: 'body',
@@ -8025,8 +8039,10 @@ const Methods = {
8025
8039
  },
8026
8040
  triggerHeaderScrollEvent (evnt: Event, fixedType: '' | 'left' | 'right') {
8027
8041
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8042
+ const reactData = $xeTable as unknown as TableReactData
8028
8043
  const internalData = $xeTable as unknown as TableInternalData
8029
8044
 
8045
+ const { scrollXLoad } = reactData
8030
8046
  const { elemStore, intoRunScroll, inWheelScroll, inVirtualScroll, inBodyScroll, inFooterScroll } = internalData
8031
8047
  const xHandleEl = $xeTable.$refs.refScrollXHandleElem as HTMLDivElement
8032
8048
  const yHandleEl = $xeTable.$refs.refScrollYHandleElem as HTMLDivElement
@@ -8056,7 +8072,9 @@ const Methods = {
8056
8072
  setScrollLeft(xHandleEl, scrollLeft)
8057
8073
  setScrollLeft(footerScrollElem, scrollLeft)
8058
8074
  setScrollLeft(bodyScrollElem, scrollLeft)
8059
- $xeTable.triggerScrollXEvent(evnt)
8075
+ if (scrollXLoad) {
8076
+ $xeTable.triggerScrollXEvent(evnt)
8077
+ }
8060
8078
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
8061
8079
  type: 'header',
8062
8080
  fixed: fixedType
@@ -8064,8 +8082,10 @@ const Methods = {
8064
8082
  },
8065
8083
  triggerFooterScrollEvent (evnt: Event, fixedType: '' | 'left' | 'right') {
8066
8084
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8085
+ const reactData = $xeTable as unknown as TableReactData
8067
8086
  const internalData = $xeTable as unknown as TableInternalData
8068
8087
 
8088
+ const { scrollXLoad } = reactData
8069
8089
  const { elemStore, intoRunScroll, inWheelScroll, inVirtualScroll, inHeaderScroll, inBodyScroll } = internalData
8070
8090
  const xHandleEl = $xeTable.$refs.refScrollXHandleElem as HTMLDivElement
8071
8091
  const yHandleEl = $xeTable.$refs.refScrollYHandleElem as HTMLDivElement
@@ -8095,7 +8115,9 @@ const Methods = {
8095
8115
  setScrollLeft(xHandleEl, scrollLeft)
8096
8116
  setScrollLeft(headerScrollElem, scrollLeft)
8097
8117
  setScrollLeft(bodyScrollElem, scrollLeft)
8098
- $xeTable.triggerScrollXEvent(evnt)
8118
+ if (scrollXLoad) {
8119
+ $xeTable.triggerScrollXEvent(evnt)
8120
+ }
8099
8121
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
8100
8122
  type: 'footer',
8101
8123
  fixed: fixedType
@@ -8112,6 +8134,7 @@ const Methods = {
8112
8134
  return
8113
8135
  }
8114
8136
  const { highlightHoverRow } = tableProps
8137
+ const { scrollYLoad } = reactData
8115
8138
  const { elemStore, lastScrollTop, lastScrollLeft } = internalData
8116
8139
  const rowOpts = $xeTable.computeRowOpts
8117
8140
  const xHandleEl = $xeTable.$refs.refScrollXHandleElem as HTMLDivElement
@@ -8160,7 +8183,9 @@ const Methods = {
8160
8183
  setScrollTop(bodyScrollElem, currTopNum)
8161
8184
  setScrollTop(leftScrollElem, currTopNum)
8162
8185
  setScrollTop(rightScrollElem, currTopNum)
8163
- $xeTable.triggerScrollYEvent(evnt)
8186
+ if (scrollYLoad) {
8187
+ $xeTable.triggerScrollYEvent(evnt)
8188
+ }
8164
8189
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
8165
8190
  type: 'table',
8166
8191
  fixed: ''
@@ -8182,8 +8207,10 @@ const Methods = {
8182
8207
  },
8183
8208
  triggerVirtualScrollXEvent (evnt: Event) {
8184
8209
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8210
+ const reactData = $xeTable as unknown as TableReactData
8185
8211
  const internalData = $xeTable as unknown as TableInternalData
8186
8212
 
8213
+ const { scrollXLoad } = reactData
8187
8214
  const { elemStore, inWheelScroll, lastScrollTop, inHeaderScroll, inBodyScroll, inFooterScroll } = internalData
8188
8215
  if (inHeaderScroll || inBodyScroll || inFooterScroll) {
8189
8216
  return
@@ -8209,7 +8236,9 @@ const Methods = {
8209
8236
  setScrollLeft(bodyScrollElem, scrollLeft)
8210
8237
  setScrollLeft(headerScrollElem, scrollLeft)
8211
8238
  setScrollLeft(footerScrollElem, scrollLeft)
8212
- $xeTable.triggerScrollXEvent(evnt)
8239
+ if (scrollXLoad) {
8240
+ $xeTable.triggerScrollXEvent(evnt)
8241
+ }
8213
8242
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
8214
8243
  type: 'table',
8215
8244
  fixed: ''
@@ -8217,8 +8246,10 @@ const Methods = {
8217
8246
  },
8218
8247
  triggerVirtualScrollYEvent (evnt: Event) {
8219
8248
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8249
+ const reactData = $xeTable as unknown as TableReactData
8220
8250
  const internalData = $xeTable as unknown as TableInternalData
8221
8251
 
8252
+ const { scrollYLoad } = reactData
8222
8253
  const { elemStore, inWheelScroll, lastScrollLeft, inHeaderScroll, inBodyScroll, inFooterScroll } = internalData
8223
8254
  if (inHeaderScroll || inBodyScroll || inFooterScroll) {
8224
8255
  return
@@ -8244,7 +8275,9 @@ const Methods = {
8244
8275
  setScrollTop(bodyScrollElem, scrollTop)
8245
8276
  setScrollTop(leftScrollElem, scrollTop)
8246
8277
  setScrollTop(rightScrollElem, scrollTop)
8247
- $xeTable.triggerScrollYEvent(evnt)
8278
+ if (scrollYLoad) {
8279
+ $xeTable.triggerScrollYEvent(evnt)
8280
+ }
8248
8281
  $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
8249
8282
  type: 'table',
8250
8283
  fixed: ''