vxe-table 4.17.4 → 4.17.5

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 (44) 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 +13 -11
  6. package/es/table/src/table.js +18 -2
  7. package/es/table/style.css +4 -3
  8. package/es/table/style.min.css +1 -1
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/dom.js +17 -0
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +4 -3
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/index.css +1 -1
  15. package/lib/index.min.css +1 -1
  16. package/lib/index.umd.js +36 -16
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/module/edit/hook.js +13 -11
  21. package/lib/table/module/edit/hook.min.js +1 -1
  22. package/lib/table/src/table.js +4 -3
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/table/style/style.css +4 -3
  25. package/lib/table/style/style.min.css +1 -1
  26. package/lib/ui/index.js +1 -1
  27. package/lib/ui/index.min.js +1 -1
  28. package/lib/ui/src/dom.js +18 -0
  29. package/lib/ui/src/dom.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +4 -3
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +1 -1
  35. package/packages/table/module/edit/hook.ts +13 -11
  36. package/packages/table/src/table.ts +19 -2
  37. package/packages/ui/src/dom.ts +18 -0
  38. package/styles/components/table.scss +34 -3
  39. /package/es/{iconfont.1761699987872.ttf → iconfont.1761786608199.ttf} +0 -0
  40. /package/es/{iconfont.1761699987872.woff → iconfont.1761786608199.woff} +0 -0
  41. /package/es/{iconfont.1761699987872.woff2 → iconfont.1761786608199.woff2} +0 -0
  42. /package/lib/{iconfont.1761699987872.ttf → iconfont.1761786608199.ttf} +0 -0
  43. /package/lib/{iconfont.1761699987872.woff → iconfont.1761786608199.woff} +0 -0
  44. /package/lib/{iconfont.1761699987872.woff2 → iconfont.1761786608199.woff2} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { h, ComponentPublicInstance, reactive, ref, Ref, provide, inject, nextTick, Teleport, onActivated, onDeactivated, onBeforeUnmount, onUnmounted, watch, computed, onMounted } from 'vue'
2
2
  import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
- import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
4
+ import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement } 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
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'
@@ -62,6 +62,7 @@ export default defineVxeComponent({
62
62
  const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
63
63
 
64
64
  const $xeTabs = inject<(VxeTabsConstructor & VxeTabsPrivateMethods) | null>('$xeTabs', null)
65
+ const $xeParentTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
65
66
  const $xeGrid = inject<(VxeGridConstructor & VxeGridPrivateMethods) | null>('$xeGrid', null)
66
67
  const $xeGantt = inject<(VxeGanttConstructor & VxeGanttPrivateMethods) | null>('$xeGantt', null)
67
68
  const $xeGGWrapper = $xeGrid || $xeGantt
@@ -11594,6 +11595,22 @@ export default defineVxeComponent({
11594
11595
  }
11595
11596
  }
11596
11597
 
11598
+ // 展开行处理,如果展开行嵌入表格中
11599
+ if ($xeParentTable) {
11600
+ if (isRollY) {
11601
+ if (checkTargetElement(evnt.target, [leftScrollElem, bodyScrollElem, rightScrollElem], evnt.currentTarget)) {
11602
+ evnt.stopPropagation()
11603
+ return
11604
+ }
11605
+ }
11606
+ if (isRollX) {
11607
+ if (checkTargetElement(evnt.target, [headerScrollElem, bodyScrollElem, footerScrollElem], evnt.currentTarget)) {
11608
+ evnt.stopPropagation()
11609
+ return
11610
+ }
11611
+ }
11612
+ }
11613
+
11597
11614
  if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
11598
11615
  return
11599
11616
  }
@@ -12850,7 +12867,7 @@ export default defineVxeComponent({
12850
12867
  watch(dataFlag, () => {
12851
12868
  const { initStatus } = internalData
12852
12869
  const value = props.data || []
12853
- if (value && value.length >= 50000) {
12870
+ if (value && value.length >= 20000) {
12854
12871
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
12855
12872
  }
12856
12873
  loadTableData(value, true).then(() => {
@@ -140,6 +140,24 @@ export function updateCellTitle (overflowElem: any, column: any) {
140
140
  }
141
141
  }
142
142
 
143
+ export function checkTargetElement (target: HTMLElement | EventTarget | null, exEls: (HTMLElement | null)[], endEl?: HTMLElement | EventTarget | null) {
144
+ let targetEl = target
145
+ if (!exEls || !exEls.length) {
146
+ return false
147
+ }
148
+ const [exEl1, exEl2, exEl3] = exEls
149
+ while (targetEl) {
150
+ if (exEl1 === targetEl || (exEl2 && targetEl === exEl2) || (exEl3 && targetEl === exEl3)) {
151
+ return true
152
+ }
153
+ if (endEl && targetEl === endEl) {
154
+ return false
155
+ }
156
+ targetEl = (targetEl as HTMLElement).parentElement
157
+ }
158
+ return false
159
+ }
160
+
143
161
  /**
144
162
  * 检查触发源是否属于目标节点
145
163
  */
@@ -2223,16 +2223,28 @@ $btnThemeList: (
2223
2223
  left: 50%;
2224
2224
  font-size: 12px;
2225
2225
  line-height: 1em;
2226
- transform: translate(-50%, -50%);
2226
+ transform: translate(-50%, -2px);
2227
2227
  text-align: left;
2228
2228
  z-index: 4;
2229
2229
  padding: 0 var(--vxe-ui-table-cell-padding-default);
2230
2230
  pointer-events: none;
2231
2231
  }
2232
2232
  .vxe-cell--valid-error-wrapper {
2233
+ position: relative;
2233
2234
  display: inline-block;
2234
2235
  border-radius: var(--vxe-ui-border-radius);
2235
2236
  pointer-events: auto;
2237
+ // &::before {
2238
+ // content: "";
2239
+ // position: absolute;
2240
+ // top: -0.75em;
2241
+ // left: 50%;
2242
+ // bottom: auto;
2243
+ // transform: translateX(-50%);
2244
+ // border-width: 0.5em;
2245
+ // border-style: solid;
2246
+ // border-color: transparent transparent var(--vxe-ui-table-validate-error-color) transparent;
2247
+ // }
2236
2248
  }
2237
2249
  .vxe-cell--valid-error-theme-beautify {
2238
2250
  padding: 0.2em 0.6em 0.25em 0.6em;
@@ -2267,12 +2279,26 @@ $btnThemeList: (
2267
2279
  &:last-child {
2268
2280
  .vxe-cell--valid-error-tip {
2269
2281
  bottom: calc(100%);
2270
- transform: translate(-50%, 50%);
2282
+ transform: translate(-50%, 0);
2283
+ // .vxe-cell--valid-error-wrapper {
2284
+ // &::before {
2285
+ // bottom: -0.75em;
2286
+ // top: auto;
2287
+ // border-color: var(--vxe-ui-table-validate-error-color) transparent transparent transparent;
2288
+ // }
2289
+ // }
2271
2290
  }
2272
2291
  &:first-child {
2273
2292
  .vxe-cell--valid-error-tip {
2274
2293
  bottom: auto;
2275
- transform: translate(-50%, -50%);
2294
+ transform: translate(-50%, -2px);
2295
+ // .vxe-cell--valid-error-wrapper {
2296
+ // &::before {
2297
+ // top: -0.75em;
2298
+ // bottom: auto;
2299
+ // border-color: transparent transparent var(--vxe-ui-table-validate-error-color) transparent;
2300
+ // }
2301
+ // }
2276
2302
  }
2277
2303
  }
2278
2304
  }
@@ -2308,6 +2334,11 @@ $btnThemeList: (
2308
2334
  background-color: #f56c6c;
2309
2335
  pointer-events: auto;
2310
2336
  }
2337
+ // .vxe-cell--valid-error-wrapper {
2338
+ // &::before {
2339
+ // display: none;
2340
+ // }
2341
+ // }
2311
2342
  }
2312
2343
  }
2313
2344
  }