vxe-table 4.23.19 → 4.24.0-beta.0

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 (62) hide show
  1. package/README.md +2 -0
  2. package/dist/all.esm.js +631 -343
  3. package/dist/all.esm.min.js +3 -3
  4. package/dist/style.css +85 -13
  5. package/dist/style.mini.css +1 -1
  6. package/es/components.d.ts +1 -3
  7. package/es/components.js +1 -2
  8. package/es/style.css +85 -13
  9. package/es/style.mini.css +1 -1
  10. package/es/table/module/custom/panel.js +2 -2
  11. package/es/table/module/edit/hook.js +95 -5
  12. package/es/table/src/body.d.ts +2 -2
  13. package/es/table/src/body.js +26 -49
  14. package/es/table/src/table.js +256 -35
  15. package/es/table/style.css +82 -13
  16. package/es/table/style.mini.css +1 -1
  17. package/es/ui/abandon.d.ts +82 -0
  18. package/es/ui/abandon.js +90 -0
  19. package/es/ui/index.d.ts +1 -82
  20. package/es/ui/index.js +6 -91
  21. package/es/ui/src/log.js +1 -1
  22. package/es/vxe-table/style.css +82 -13
  23. package/es/vxe-table/style.mini.css +1 -1
  24. package/lib/components.d.ts +1 -3
  25. package/lib/components.js +1 -2
  26. package/lib/index.umd.js +630 -340
  27. package/lib/index.umd.min.js +3 -3
  28. package/lib/style.css +85 -13
  29. package/lib/style.mini.css +1 -1
  30. package/lib/table/module/custom/panel.js +2 -2
  31. package/lib/table/module/edit/hook.js +95 -5
  32. package/lib/table/src/body.d.ts +2 -2
  33. package/lib/table/src/body.js +26 -49
  34. package/lib/table/src/table.js +256 -35
  35. package/lib/table/style/style.css +82 -13
  36. package/lib/table/style/style.mini.css +1 -1
  37. package/lib/ui/abandon.d.ts +82 -0
  38. package/lib/ui/abandon.js +110 -0
  39. package/lib/ui/index.d.ts +1 -82
  40. package/lib/ui/index.js +7 -91
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/vxe-table/style/style.css +82 -13
  43. package/lib/vxe-table/style/style.mini.css +1 -1
  44. package/package.json +2 -2
  45. package/packages/components.ts +2 -5
  46. package/packages/table/module/custom/panel.ts +2 -2
  47. package/packages/table/module/edit/hook.ts +95 -5
  48. package/packages/table/src/body.ts +28 -50
  49. package/packages/table/src/table.ts +292 -34
  50. package/packages/ui/abandon.ts +136 -0
  51. package/packages/ui/index.ts +12 -122
  52. package/styles/components/table.scss +141 -87
  53. package/styles/theme/base.scss +3 -0
  54. /package/dist/{iconfont.1794474448348.ttf → iconfont.1794558570397.ttf} +0 -0
  55. /package/dist/{iconfont.1794474448348.woff → iconfont.1794558570397.woff} +0 -0
  56. /package/dist/{iconfont.1794474448348.woff2 → iconfont.1794558570397.woff2} +0 -0
  57. /package/es/{iconfont.1794474448348.ttf → iconfont.1794558570397.ttf} +0 -0
  58. /package/es/{iconfont.1794474448348.woff → iconfont.1794558570397.woff} +0 -0
  59. /package/es/{iconfont.1794474448348.woff2 → iconfont.1794558570397.woff2} +0 -0
  60. /package/lib/{iconfont.1794474448348.ttf → iconfont.1794558570397.ttf} +0 -0
  61. /package/lib/{iconfont.1794474448348.woff → iconfont.1794558570397.woff} +0 -0
  62. /package/lib/{iconfont.1794474448348.woff2 → iconfont.1794558570397.woff2} +0 -0
@@ -1,13 +1,15 @@
1
1
  import { VxeUI } from '@vxe-ui/core'
2
- import { getFuncText } from './src/utils'
3
-
4
- import type { VxeUploadDefines, VxePrintDefines, VxeGlobalConfig } from 'vxe-pc-ui'
5
2
 
6
3
  export const version = process.env.VUE_APP_VXE_VERSION as string
7
4
 
8
- VxeUI.version = version
9
5
  VxeUI.tableVersion = version
10
6
 
7
+ /**
8
+ * 已废弃,兼容老版本
9
+ * @deprecated
10
+ */
11
+ VxeUI.version = version
12
+
11
13
  VxeUI.setConfig({
12
14
  emptyCell: ' ',
13
15
 
@@ -182,7 +184,7 @@ VxeUI.setConfig({
182
184
  parentField: '_X_ROW_PARENT_KEY',
183
185
  childrenField: '_X_ROW_CHILDREN',
184
186
  mapChildrenField: '_X_ROW_CHILD_LIST',
185
- indent: 20,
187
+ indent: 28,
186
188
  showIcon: true,
187
189
  maxGroupSize: 4,
188
190
  showAggFuncTitle: true
@@ -194,8 +196,9 @@ VxeUI.setConfig({
194
196
  childrenField: 'children',
195
197
  hasChildField: 'hasChild',
196
198
  mapChildrenField: '_X_ROW_CHILD',
197
- indent: 20,
199
+ indent: 28,
198
200
  showIcon: true,
201
+ // lineType: 'dashed',
199
202
  showRootLine: true
200
203
  },
201
204
  expandConfig: {
@@ -401,124 +404,11 @@ VxeUI.setIcon({
401
404
  TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill'
402
405
  })
403
406
 
404
- /**
405
- * 已废弃
406
- * @deprecated
407
- */
408
- export const setup = (options?: VxeGlobalConfig) => {
409
- return VxeUI.setConfig(options)
410
- }
411
- VxeUI.setup = setup
412
- /**
413
- * 已废弃
414
- * @deprecated
415
- */
416
- export const config = (options?: VxeGlobalConfig) => {
417
- return VxeUI.setConfig(options)
418
- }
419
- VxeUI.config = config
420
- /**
421
- * 已废弃
422
- * @deprecated
423
- */
424
- export const t = (key: string, args?: any) => {
425
- return VxeUI.getI18n(key, args)
426
- }
427
- VxeUI.t = t
428
- /**
429
- * 已废弃
430
- * @deprecated
431
- */
432
- export const _t = (content: string | number | boolean | null | undefined, args?: any) => {
433
- return getFuncText(content, args)
434
- }
435
- VxeUI._t = _t
436
-
437
- /**
438
- * 已废弃,兼容老版本
439
- * @deprecated
440
- */
441
- export const VXETable = VxeUI
442
-
443
- /**
444
- * 已废弃,兼容老版本
445
- * @deprecated
446
- */
447
- export const saveFile: VxeUploadDefines.SaveFileFunction = (options) => {
448
- return VxeUI.saveFile(options)
449
- }
450
- /**
451
- * 已废弃,兼容老版本
452
- * @deprecated
453
- */
454
- export const readFile: VxeUploadDefines.ReadFileFunction = (options) => {
455
- return VxeUI.readFile(options)
456
- }
457
- /**
458
- * 已废弃,兼容老版本
459
- * @deprecated
460
- */
461
- export const print: VxePrintDefines.PrintFunction = (options) => {
462
- return VxeUI.print(options)
463
- }
464
- /**
465
- * 已废弃,兼容老版本
466
- * @deprecated
467
- */
468
- export const modal = {
469
- /**
470
- * 已废弃,兼容老版本
471
- * @deprecated
472
- */
473
- get(id: any) {
474
- return VxeUI.modal.get(id)
475
- },
476
- /**
477
- * 已废弃,兼容老版本
478
- * @deprecated
479
- */
480
- close(id: any) {
481
- return VxeUI.modal.close(id)
482
- },
483
- /**
484
- * 已废弃,兼容老版本
485
- * @deprecated
486
- */
487
- open(options: any) {
488
- return VxeUI.modal.open(options)
489
- },
490
- /**
491
- * 已废弃,兼容老版本
492
- * @deprecated
493
- */
494
- alert(content: any, title: any, options: any) {
495
- return VxeUI.modal.alert(content, title, options)
496
- },
497
- /**
498
- * 已废弃,兼容老版本
499
- * @deprecated
500
- */
501
- confirm(content: any, title: any, options: any) {
502
- return VxeUI.modal.confirm(content, title, options)
503
- },
504
- /**
505
- * 已废弃,兼容老版本
506
- * @deprecated
507
- */
508
- message(content: any, options: any) {
509
- return VxeUI.modal.message(content, options)
510
- },
511
- /**
512
- * 已废弃,兼容老版本
513
- * @deprecated
514
- */
515
- notification(content: any, title: any, options: any) {
516
- return VxeUI.modal.notification(content, title, options)
517
- }
518
- }
519
-
520
407
  export {
521
408
  VxeUI
522
409
  }
523
410
 
411
+ // 兼容老版本
412
+ export * from './abandon'
413
+
524
414
  export default VxeUI
@@ -10,25 +10,31 @@
10
10
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-default);
11
11
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-default);
12
12
  --vxe-ui-table-current-row-line-height: var(--vxe-ui-table-row-line-height);
13
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-default);
13
14
  &.size--xlarge {
14
15
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-xlarge);
15
16
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-xlarge);
17
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-xlarge);
16
18
  }
17
19
  &.size--large {
18
20
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-large);
19
21
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-large);
22
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-large);
20
23
  }
21
24
  &.size--medium {
22
25
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-medium);
23
26
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-medium);
27
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-medium);
24
28
  }
25
29
  &.size--small {
26
30
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-small);
27
31
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-small);
32
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-small);
28
33
  }
29
34
  &.size--mini {
30
35
  --vxe-ui-table-current-font-size: var(--vxe-ui-font-size-mini);
31
36
  --vxe-ui-table-current-cell-padding: var(--vxe-ui-table-cell-padding-mini);
37
+ --vxe-ui-table-current-row-height: var(--vxe-ui-table-row-height-mini);
32
38
  }
33
39
  }
34
40
 
@@ -1623,17 +1629,6 @@ $btnThemeList: (
1623
1629
  // }
1624
1630
  }
1625
1631
  }
1626
- // &.is--tree-line {
1627
- // .vxe-header--column,
1628
- // .vxe-body--column,
1629
- // .vxe-footer--column {
1630
- // &.col--current {
1631
- // .vxe-cell--tree-btn {
1632
- // background-color: var(--vxe-ui-table-column-current-background-color);
1633
- // }
1634
- // }
1635
- // }
1636
- // }
1637
1632
 
1638
1633
  // 行高亮
1639
1634
  .vxe-body--row {
@@ -1681,55 +1676,6 @@ $btnThemeList: (
1681
1676
  }
1682
1677
  }
1683
1678
  }
1684
- // &.is--tree-line {
1685
- // .vxe-body--row {
1686
- // &.row--stripe {
1687
- // .vxe-cell--tree-btn {
1688
- // background-color: var(--vxe-ui-table-row-striped-background-color);
1689
- // }
1690
- // }
1691
- // &.row--radio {
1692
- // .vxe-cell--tree-btn {
1693
- // background-color: var(--vxe-ui-table-row-radio-checked-background-color);
1694
- // }
1695
- // }
1696
- // &.row--checked {
1697
- // .vxe-cell--tree-btn {
1698
- // background-color: var(--vxe-ui-table-row-checkbox-checked-background-color);
1699
- // }
1700
- // }
1701
- // &.row--current {
1702
- // .vxe-cell--tree-btn {
1703
- // background-color: var(--vxe-ui-table-row-current-background-color);
1704
- // }
1705
- // }
1706
- // &.row--hover {
1707
- // .vxe-cell--tree-btn {
1708
- // background-color: var(--vxe-ui-table-row-hover-background-color);
1709
- // }
1710
- // &.row--stripe {
1711
- // .vxe-cell--tree-btn {
1712
- // background-color: var(--vxe-ui-table-row-hover-striped-background-color);
1713
- // }
1714
- // }
1715
- // &.row--radio {
1716
- // .vxe-cell--tree-btn {
1717
- // background-color: var(--vxe-ui-table-row-hover-radio-checked-background-color);
1718
- // }
1719
- // }
1720
- // &.row--checked {
1721
- // .vxe-cell--tree-btn {
1722
- // background-color: var(--vxe-ui-table-row-hover-checkbox-checked-background-color);
1723
- // }
1724
- // }
1725
- // &.row--current {
1726
- // .vxe-cell--tree-btn {
1727
- // background-color: var(--vxe-ui-table-row-hover-current-background-color);
1728
- // }
1729
- // }
1730
- // }
1731
- // }
1732
- // }
1733
1679
 
1734
1680
  /*边框*/
1735
1681
  &.border--default,
@@ -2068,36 +2014,144 @@ $btnThemeList: (
2068
2014
  border: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
2069
2015
  }
2070
2016
 
2017
+ // 虚线
2018
+ @mixin dashed-vertical {
2019
+ background-color: transparent;
2020
+ background-image: linear-gradient(to bottom, var(--vxe-ui-table-tree-node-line-color) 50%, transparent 50%);
2021
+ background-size: var(--vxe-ui-table-tree-node-line-width) calc(var(--vxe-ui-table-tree-node-line-width) * 4);
2022
+ }
2023
+ @mixin dashed-horizontal {
2024
+ background-color: transparent;
2025
+ background-image: linear-gradient(to right, var(--vxe-ui-table-tree-node-line-color) 50%, transparent 50%);
2026
+ background-size: calc(var(--vxe-ui-table-tree-node-line-width) * 4) var(--vxe-ui-table-tree-node-line-width);
2027
+ }
2028
+
2029
+ // 点线
2030
+ @mixin dotted-vertical {
2031
+ background-color: transparent;
2032
+ background-image: linear-gradient(to bottom, var(--vxe-ui-table-tree-node-line-color) 50%, transparent 50%);
2033
+ background-size: var(--vxe-ui-table-tree-node-line-width) calc(var(--vxe-ui-table-tree-node-line-width) * 2);
2034
+ }
2035
+ @mixin dotted-horizontal {
2036
+ background-color: transparent;
2037
+ background-image: linear-gradient(to right, var(--vxe-ui-table-tree-node-line-color) 50%, transparent 50%);
2038
+ background-size: calc(var(--vxe-ui-table-tree-node-line-width) * 2) var(--vxe-ui-table-tree-node-line-width);
2039
+ }
2071
2040
  /*树形节点*/
2072
- // &.is--tree-line {
2073
- // .vxe-body--row {
2074
- // &:first-child {
2075
- // .vxe-tree--line {
2076
- // border-width: 0 0 1px 0;
2077
- // }
2078
- // }
2079
- // }
2080
- // .vxe-body--row {
2081
- // .vxe-body--column {
2082
- // background-image: none;
2083
- // }
2084
- // }
2085
- // }
2086
- .vxe-tree--line-wrapper {
2087
- position: relative;
2088
- display: block;
2089
- height: 0;
2041
+ .vxe-tree--line {
2042
+ --vxe-ui-table-current-line-gap: calc((var(--vxe-ui-table-cell-height, var(--vxe-ui-table-current-row-height)) - var(--vxe-ui-table-tree-node-btn-width)) / 2);
2090
2043
  }
2091
2044
  .vxe-tree--line {
2092
- content: "";
2093
2045
  position: absolute;
2094
- bottom: -1.5em;
2095
- width: 0.8em;
2096
- border-width: 0 0 1px 1px;
2097
- border-style: var(--vxe-ui-table-tree-node-line-style);
2098
- border-color: var(--vxe-ui-table-tree-node-line-color);
2099
2046
  pointer-events: none;
2047
+
2048
+ &.v {
2049
+ width: var(--vxe-ui-table-tree-node-line-width);
2050
+ transform: translateX(-50%);
2051
+
2052
+ /* 伪元素基础尺寸和位置,不含背景 */
2053
+ &.cut-full::before,
2054
+ &.cut-top::before,
2055
+ &.cut-full::after,
2056
+ &.cut-bottom::after {
2057
+ content: '';
2058
+ position: absolute;
2059
+ left: 0;
2060
+ width: var(--vxe-ui-table-tree-node-line-width);
2061
+ }
2062
+
2063
+ &.cut-full::before,
2064
+ &.cut-top::before {
2065
+ top: 0;
2066
+ height: var(--vxe-ui-table-current-line-gap);
2067
+ }
2068
+
2069
+ &.cut-full::after,
2070
+ &.cut-bottom::after {
2071
+ top: calc(100% - var(--vxe-ui-table-current-line-gap));
2072
+ height: var(--vxe-ui-table-current-line-gap);
2073
+ }
2074
+ }
2075
+
2076
+ &.h {
2077
+ height: var(--vxe-ui-table-tree-node-line-width);
2078
+ transform: translateY(-50%);
2079
+ }
2100
2080
  }
2081
+ .vxe-tree--line {
2082
+ // 实线
2083
+ &.type--solid {
2084
+ &.v {
2085
+ background-color: var(--vxe-ui-table-tree-node-line-color);
2086
+
2087
+ &.cut-full,
2088
+ &.cut-top,
2089
+ &.cut-bottom {
2090
+ background: none;
2091
+ }
2092
+
2093
+ &.cut-full::before,
2094
+ &.cut-top::before,
2095
+ &.cut-full::after,
2096
+ &.cut-bottom::after {
2097
+ background-color: var(--vxe-ui-table-tree-node-line-color);
2098
+ }
2099
+ }
2100
+
2101
+ &.h {
2102
+ background-color: var(--vxe-ui-table-tree-node-line-color);
2103
+ }
2104
+ }
2105
+
2106
+ // 虚线
2107
+ &.type--dashed {
2108
+ &.v {
2109
+ @include dashed-vertical;
2110
+
2111
+ &.cut-full,
2112
+ &.cut-top,
2113
+ &.cut-bottom {
2114
+ background: none;
2115
+ }
2116
+
2117
+ &.cut-full::before,
2118
+ &.cut-top::before,
2119
+ &.cut-full::after,
2120
+ &.cut-bottom::after {
2121
+ @include dashed-vertical;
2122
+ }
2123
+ }
2124
+
2125
+ &.h {
2126
+ @include dashed-horizontal;
2127
+ }
2128
+ }
2129
+
2130
+ // 点线
2131
+ &.type--dotted {
2132
+ &.v {
2133
+ @include dotted-vertical;
2134
+
2135
+ &.cut-full,
2136
+ &.cut-top,
2137
+ &.cut-bottom {
2138
+ background: none;
2139
+ }
2140
+
2141
+ &.cut-full::before,
2142
+ &.cut-top::before,
2143
+ &.cut-full::after,
2144
+ &.cut-bottom::after {
2145
+ @include dotted-vertical;
2146
+ }
2147
+ }
2148
+
2149
+ &.h {
2150
+ @include dotted-horizontal;
2151
+ }
2152
+ }
2153
+ }
2154
+
2101
2155
  .vxe-row-group--tree-node,
2102
2156
  .vxe-cell--tree-node {
2103
2157
  position: relative;
@@ -2116,14 +2170,14 @@ $btnThemeList: (
2116
2170
  .vxe-row-group-cell,
2117
2171
  .vxe-tree-cell {
2118
2172
  display: block;
2119
- padding-left: 1.5em;
2173
+ padding-left: var(--vxe-ui-table-tree-node-indent);
2120
2174
  }
2121
2175
  .vxe-cell--tree-btn,
2122
2176
  .vxe-row-group--node-btn{
2123
2177
  position: absolute;
2124
2178
  top: 50%;
2125
- width: 1em;
2126
- height: 1em;
2179
+ width: var(--vxe-ui-table-tree-node-btn-width);
2180
+ height: var(--vxe-ui-table-tree-node-btn-width);
2127
2181
  text-align: center;
2128
2182
  transform: translateY(-50%);
2129
2183
  z-index: 1;
@@ -30,6 +30,9 @@
30
30
  --vxe-ui-table-resizable-line-color: #D9DDDF;
31
31
  --vxe-ui-table-resizable-drag-line-color: var(--vxe-ui-font-primary-color);
32
32
  --vxe-ui-table-footer-background-color: var(--vxe-ui-layout-background-color);
33
+ --vxe-ui-table-tree-node-btn-width: 1em;
34
+ --vxe-ui-table-tree-node-indent: 1.5em;
35
+ --vxe-ui-table-tree-node-line-width: 1px;
33
36
  --vxe-ui-table-tree-node-line-color:#909399;
34
37
  --vxe-ui-table-tree-node-line-style: dotted;
35
38
  --vxe-ui-table-header-font-weight: 700;