vxe-table 4.9.8 → 4.9.10

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 (59) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/edit/hook.js +16 -4
  6. package/es/table/module/export/import-panel.js +1 -1
  7. package/es/table/src/body.js +9 -6
  8. package/es/table/src/columnInfo.js +1 -1
  9. package/es/table/src/footer.js +7 -1
  10. package/es/table/src/table.js +13 -5
  11. package/es/table/src/util.js +0 -10
  12. package/es/table/style.css +1 -1
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +1 -1
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/lib/index.css +1 -1
  19. package/lib/index.min.css +1 -1
  20. package/lib/index.umd.js +74 -32
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/table/module/edit/hook.js +38 -4
  25. package/lib/table/module/edit/hook.min.js +1 -1
  26. package/lib/table/module/export/import-panel.js +1 -1
  27. package/lib/table/module/export/import-panel.min.js +1 -1
  28. package/lib/table/src/body.js +9 -6
  29. package/lib/table/src/body.min.js +1 -1
  30. package/lib/table/src/columnInfo.js +3 -3
  31. package/lib/table/src/columnInfo.min.js +1 -1
  32. package/lib/table/src/footer.js +7 -1
  33. package/lib/table/src/footer.min.js +1 -1
  34. package/lib/table/src/table.js +14 -5
  35. package/lib/table/src/table.min.js +1 -1
  36. package/lib/table/src/util.js +0 -10
  37. package/lib/table/style/style.css +1 -1
  38. package/lib/table/style/style.min.css +1 -1
  39. package/lib/ui/index.js +1 -1
  40. package/lib/ui/index.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/lib/vxe-table/style/style.css +1 -1
  44. package/lib/vxe-table/style/style.min.css +1 -1
  45. package/package.json +2 -2
  46. package/packages/table/module/edit/hook.ts +16 -4
  47. package/packages/table/module/export/import-panel.ts +1 -1
  48. package/packages/table/src/body.ts +14 -11
  49. package/packages/table/src/columnInfo.ts +1 -1
  50. package/packages/table/src/footer.ts +7 -1
  51. package/packages/table/src/table.ts +18 -8
  52. package/packages/table/src/util.ts +0 -16
  53. package/styles/components/table.scss +1 -1
  54. /package/es/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
  55. /package/es/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
  56. /package/es/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
  57. /package/lib/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
  58. /package/lib/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
  59. /package/lib/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header'
9
9
  import TableFooterComponent from './footer'
10
10
  import tableProps from './props'
11
11
  import tableEmits from './emits'
12
- import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, XEBodyScrollElement, getRootColumn, getRefElem } from './util'
12
+ import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem } from './util'
13
13
  import { getSlotVNs } from '../../ui/src/vn'
14
14
  import { warnLog, errLog } from '../../ui/src/log'
15
15
  import TableCustomPanelComponent from '../module/custom/panel'
@@ -2491,7 +2491,7 @@ export default defineComponent({
2491
2491
  * @param {Array} datas 数据
2492
2492
  */
2493
2493
  const loadTableData = (datas: any[]) => {
2494
- const { keepSource, treeConfig } = props
2494
+ const { keepSource, treeConfig, showOverflow } = props
2495
2495
  const { editStore, scrollYLoad: oldScrollYLoad } = reactData
2496
2496
  const { scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData
2497
2497
  const treeOpts = computeTreeOpts.value
@@ -2556,8 +2556,15 @@ export default defineComponent({
2556
2556
  if (keepSource) {
2557
2557
  tablePrivateMethods.cacheSourceMap(fullData)
2558
2558
  }
2559
- if (process.env.VUE_APP_VXE_ENV === 'development') {
2560
- if (sYLoad) {
2559
+ if (sYLoad) {
2560
+ if (showOverflow) {
2561
+ const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
2562
+ if (errColumn) {
2563
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
2564
+ }
2565
+ }
2566
+
2567
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
2561
2568
  if (!(props.height || props.maxHeight)) {
2562
2569
  errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
2563
2570
  }
@@ -3594,7 +3601,7 @@ export default defineComponent({
3594
3601
  isInsertByRow (row) {
3595
3602
  const { editStore } = reactData
3596
3603
  const rowid = getRowid($xeTable, row)
3597
- return editStore.insertMaps[rowid]
3604
+ return !!editStore.insertMaps[rowid]
3598
3605
  },
3599
3606
  /**
3600
3607
  * 删除所有新增的临时数据
@@ -4721,7 +4728,7 @@ export default defineComponent({
4721
4728
  const { transform, lazy } = treeOpts
4722
4729
  const rowid = getRowid($xeTable, row)
4723
4730
  if (lazy && row[hasChildField] && !treeExpandLazyLoadedMaps[rowid]) {
4724
- tableMethods.clearTreeExpandLoaded(row).then(() => {
4731
+ return tableMethods.clearTreeExpandLoaded(row).then(() => {
4725
4732
  return handleAsyncTreeExpandChilds(row)
4726
4733
  }).then(() => {
4727
4734
  if (transform) {
@@ -4933,8 +4940,8 @@ export default defineComponent({
4933
4940
  const leftBody = refTableLeftBody.value
4934
4941
  const rightBody = refTableRightBody.value
4935
4942
  const leftBodyElem = leftBody ? leftBody.$el as HTMLDivElement : null
4936
- const tableBodyElem = tableBody ? tableBody.$el as XEBodyScrollElement : null
4937
- const rightBodyElem = rightBody ? rightBody.$el as XEBodyScrollElement : null
4943
+ const tableBodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
4944
+ const rightBodyElem = rightBody ? rightBody.$el as HTMLDivElement : null
4938
4945
  const tableHeaderElem = tableHeader ? tableHeader.$el as HTMLDivElement : null
4939
4946
  const tableFooterElem = tableFooter ? tableFooter.$el as HTMLDivElement : null
4940
4947
  const xHandleEl = refScrollXHandleElem.value
@@ -7026,6 +7033,7 @@ export default defineComponent({
7026
7033
  const trEl = evnt.currentTarget as HTMLElement
7027
7034
  const rowid = trEl.getAttribute('rowid')
7028
7035
  const row = $xeTable.getRowById(rowid)
7036
+ console.log(rowid)
7029
7037
  if (row) {
7030
7038
  evnt.preventDefault()
7031
7039
  evnt.preventDefault()
@@ -7154,6 +7162,8 @@ export default defineComponent({
7154
7162
  oldIndex: oafIndex
7155
7163
  }
7156
7164
  }, evnt)
7165
+
7166
+ $xeTable.saveCustomStore('update:sort')
7157
7167
  }).catch(() => {
7158
7168
  })
7159
7169
  }
@@ -68,10 +68,6 @@ export const convertHeaderColumnToRows = (originColumns: any): any[][] => {
68
68
  return rows
69
69
  }
70
70
 
71
- export interface XEBodyScrollElement extends HTMLDivElement {
72
- _onscroll: ((evnt: Event) => void) | null;
73
- }
74
-
75
71
  export function restoreScrollLocation ($xeTable: VxeTableConstructor, scrollLeft: number, scrollTop: number) {
76
72
  const { internalData } = $xeTable
77
73
  return $xeTable.clearScroll().then(() => {
@@ -85,18 +81,6 @@ export function restoreScrollLocation ($xeTable: VxeTableConstructor, scrollLeft
85
81
  })
86
82
  }
87
83
 
88
- // export function removeScrollListener (scrollElem: XEBodyScrollElement | null) {
89
- // if (scrollElem && scrollElem._onscroll) {
90
- // scrollElem.onscroll = null
91
- // }
92
- // }
93
-
94
- // export function restoreScrollListener (scrollElem: XEBodyScrollElement | null) {
95
- // if (scrollElem && scrollElem._onscroll) {
96
- // scrollElem.onscroll = scrollElem._onscroll
97
- // }
98
- // }
99
-
100
84
  /**
101
85
  * 生成行的唯一主键
102
86
  */
@@ -1288,7 +1288,7 @@
1288
1288
  position: absolute;
1289
1289
  top: 0;
1290
1290
  left: 0;
1291
- z-index: 9;
1291
+ z-index: 11;
1292
1292
  pointer-events: none;
1293
1293
  }
1294
1294
  .vxe-cell--drag-handle {