vxe-pc-ui 4.19.8 → 4.20.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 (100) hide show
  1. package/dist/all.esm.js +878 -115
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/card/src/card.js +17 -3
  5. package/es/icon/style.css +1 -1
  6. package/es/language/fr-FR.js +29 -29
  7. package/es/layout-aside/src/layout-aside.js +8 -5
  8. package/es/layout-body/src/layout-body.js +19 -11
  9. package/es/list/src/list.js +364 -21
  10. package/es/list/style.css +43 -0
  11. package/es/list/style.min.css +1 -1
  12. package/es/scrollbar/src/scrollbar.js +59 -17
  13. package/es/scrollbar/style.css +1 -0
  14. package/es/style.css +1 -1
  15. package/es/style.min.css +1 -1
  16. package/es/tabs/src/tabs.js +19 -4
  17. package/es/tree/src/tree.js +393 -55
  18. package/es/tree/style.css +43 -0
  19. package/es/tree/style.min.css +1 -1
  20. package/es/ui/index.js +1 -1
  21. package/es/ui/src/log.js +1 -1
  22. package/es/ui/src/utils.js +12 -0
  23. package/es/vxe-list/style.css +43 -0
  24. package/es/vxe-list/style.min.css +1 -1
  25. package/es/vxe-scrollbar/style.css +1 -0
  26. package/es/vxe-tree/style.css +43 -0
  27. package/es/vxe-tree/style.min.css +1 -1
  28. package/lib/card/src/card.js +17 -3
  29. package/lib/card/src/card.min.js +1 -1
  30. package/lib/icon/style/style.css +1 -1
  31. package/lib/icon/style/style.min.css +1 -1
  32. package/lib/index.umd.js +914 -126
  33. package/lib/index.umd.min.js +1 -1
  34. package/lib/language/fr-FR.js +29 -29
  35. package/lib/language/fr-FR.min.js +1 -1
  36. package/lib/language/fr-FR.umd.js +29 -29
  37. package/lib/layout-aside/src/layout-aside.js +7 -7
  38. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  39. package/lib/layout-body/src/layout-body.js +27 -21
  40. package/lib/layout-body/src/layout-body.min.js +1 -1
  41. package/lib/list/src/list.js +368 -21
  42. package/lib/list/src/list.min.js +1 -1
  43. package/lib/list/style/style.css +43 -0
  44. package/lib/list/style/style.min.css +1 -1
  45. package/lib/scrollbar/src/scrollbar.js +67 -15
  46. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  47. package/lib/scrollbar/style/style.css +1 -0
  48. package/lib/style.css +1 -1
  49. package/lib/style.min.css +1 -1
  50. package/lib/tabs/src/tabs.js +22 -10
  51. package/lib/tabs/src/tabs.min.js +1 -1
  52. package/lib/tree/src/tree.js +397 -53
  53. package/lib/tree/src/tree.min.js +1 -1
  54. package/lib/tree/style/style.css +43 -0
  55. package/lib/tree/style/style.min.css +1 -1
  56. package/lib/ui/index.js +1 -1
  57. package/lib/ui/index.min.js +1 -1
  58. package/lib/ui/src/log.js +1 -1
  59. package/lib/ui/src/log.min.js +1 -1
  60. package/lib/ui/src/utils.js +14 -0
  61. package/lib/ui/src/utils.min.js +1 -1
  62. package/lib/vxe-list/style/style.css +43 -0
  63. package/lib/vxe-list/style/style.min.css +1 -1
  64. package/lib/vxe-scrollbar/style/style.css +1 -0
  65. package/lib/vxe-tree/style/style.css +43 -0
  66. package/lib/vxe-tree/style/style.min.css +1 -1
  67. package/package.json +1 -1
  68. package/packages/card/src/card.ts +18 -3
  69. package/packages/language/fr-FR.ts +903 -903
  70. package/packages/layout-aside/src/layout-aside.ts +8 -5
  71. package/packages/layout-body/src/layout-body.ts +23 -14
  72. package/packages/list/src/list.ts +397 -24
  73. package/packages/scrollbar/src/scrollbar.ts +63 -16
  74. package/packages/tabs/src/tabs.ts +19 -5
  75. package/packages/tree/src/tree.ts +432 -64
  76. package/packages/ui/src/utils.ts +14 -0
  77. package/styles/components/list.scss +76 -0
  78. package/styles/components/scrollbar.scss +3 -0
  79. package/styles/components/tree.scss +76 -0
  80. package/types/components/card.d.ts +10 -1
  81. package/types/components/layout-aside.d.ts +10 -1
  82. package/types/components/layout-body.d.ts +10 -1
  83. package/types/components/list.d.ts +33 -2
  84. package/types/components/scrollbar.d.ts +17 -2
  85. package/types/components/table-plugins/extend-cell-area.d.ts +1 -1
  86. package/types/components/table.d.ts +71 -4
  87. package/types/components/tabs.d.ts +10 -1
  88. package/types/components/tree.d.ts +33 -2
  89. /package/es/icon/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
  90. /package/es/icon/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
  91. /package/es/icon/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
  92. /package/es/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
  93. /package/es/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
  94. /package/es/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
  95. /package/lib/icon/style/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
  96. /package/lib/icon/style/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
  97. /package/lib/icon/style/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
  98. /package/lib/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
  99. /package/lib/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
  100. /package/lib/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
@@ -4,6 +4,7 @@ import XEUtils from 'xe-utils';
4
4
  import { VxeUI } from '../../ui';
5
5
  import { toCssUnit } from '../../ui/src/dom';
6
6
  import { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } from './util';
7
+ import { getDefaultConfig } from '../../ui/src/utils';
7
8
  import VxeLoadingComponent from '../../loading';
8
9
  const { getConfig, createEvent, domUtils, globalResize, globalEvents, renderEmptyElement } = VxeUI;
9
10
  function createReactData() {
@@ -27,6 +28,7 @@ export default defineVxeComponent({
27
28
  name: 'VxeScrollbar',
28
29
  props: {
29
30
  id: [String, Number],
31
+ viewId: [String, Number],
30
32
  width: [String, Number],
31
33
  height: [String, Number],
32
34
  minWidth: [String, Number],
@@ -42,6 +44,14 @@ export default defineVxeComponent({
42
44
  type: Boolean,
43
45
  default: () => getConfig().scrollbar.padding
44
46
  },
47
+ autoHide: {
48
+ type: Boolean,
49
+ default: () => getConfig().scrollbar.autoHide
50
+ },
51
+ visible: {
52
+ type: Boolean,
53
+ default: () => getConfig().scrollbar.visible
54
+ },
45
55
  xConfig: Object,
46
56
  yConfig: Object,
47
57
  className: {
@@ -86,6 +96,8 @@ export default defineVxeComponent({
86
96
  const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
87
97
  const xOpts = computeXOpts.value;
88
98
  const yOpts = computeYOpts.value;
99
+ const barWidth = yOpts.width;
100
+ const barHeight = xOpts.height;
89
101
  const stys = {};
90
102
  if (width) {
91
103
  stys.width = toCssUnit(width);
@@ -105,33 +117,53 @@ export default defineVxeComponent({
105
117
  if (maxHeight) {
106
118
  stys.maxHeight = toCssUnit(maxHeight);
107
119
  }
108
- if (yOpts.width) {
109
- stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(yOpts.width);
110
- }
111
- if (xOpts.height) {
112
- stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height);
120
+ if (barWidth || barHeight) {
121
+ stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight);
122
+ stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth);
113
123
  }
114
124
  return stys;
115
125
  });
126
+ const computeXVisible = computed(() => {
127
+ const { visible } = props;
128
+ const xOpts = computeXOpts.value;
129
+ return getDefaultConfig(xOpts.visible, visible);
130
+ });
131
+ const computeYVisible = computed(() => {
132
+ const { visible } = props;
133
+ const yOpts = computeYOpts.value;
134
+ return getDefaultConfig(yOpts.visible, visible);
135
+ });
136
+ const computeXAutoHide = computed(() => {
137
+ const { autoHide } = props;
138
+ const xOpts = computeXOpts.value;
139
+ return getDefaultConfig(xOpts.autoHide, autoHide);
140
+ });
141
+ const computeYAutoHide = computed(() => {
142
+ const { autoHide } = props;
143
+ const yOpts = computeYOpts.value;
144
+ return getDefaultConfig(yOpts.autoHide, autoHide);
145
+ });
116
146
  const computeWrapperClss = computed(() => {
117
147
  const { native, className, padding } = props;
118
148
  const { yThumbHeight, xThumbWidth } = reactData;
119
- const xOpts = computeXOpts.value;
120
- const yOpts = computeYOpts.value;
121
149
  const xToTop = computeXToTop.value;
122
150
  const yToLeft = computeYToLeft.value;
151
+ const xVisible = computeXVisible.value;
152
+ const yVisible = computeYVisible.value;
153
+ const xAutoHide = computeXAutoHide.value;
154
+ const yAutoHide = computeYAutoHide.value;
123
155
  return domUtils.buildClass([
124
156
  'vxe-scrollbar',
125
- `ov-x--${xOpts.visible || 'visible'}`,
126
- `ov-y--${yOpts.visible || 'visible'}`,
157
+ `ov-x--${xVisible === false ? 'hidden' : 'visible'}`,
158
+ `ov-y--${yVisible === false ? 'hidden' : 'visible'}`,
127
159
  `sx-pos--${xToTop ? 'top' : 'bottom'}`,
128
160
  `sy-pos--${yToLeft ? 'left' : 'right'}`,
129
161
  native ? 'is--native' : 'is--virtual',
130
162
  className
131
163
  ], {
132
164
  'is--padding': padding,
133
- 'ov-x--auto-hide': xOpts.autoHide,
134
- 'ov-y--auto-hide': yOpts.autoHide,
165
+ 'ov-x--auto-hide': xAutoHide,
166
+ 'ov-y--auto-hide': yAutoHide,
135
167
  'overflow-y': yThumbHeight,
136
168
  'overflow-x': xThumbWidth
137
169
  });
@@ -471,13 +503,13 @@ export default defineVxeComponent({
471
503
  const scrollbarPrivateMethods = {};
472
504
  Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods);
473
505
  const renderVN = () => {
474
- const { id, native, loading, viewAttrs } = props;
506
+ const { id, native, loading, viewId, viewAttrs } = props;
475
507
  const wrapperStyle = computeWrapperStyle.value;
476
508
  const wrapperClss = computeWrapperClss.value;
477
509
  const viewClss = computeViewClss.value;
478
510
  const viewInnerClss = computeViewInnerClss.value;
479
- const xOpts = computeXOpts.value;
480
- const yOpts = computeYOpts.value;
511
+ const xVisible = computeXVisible.value;
512
+ const yVisible = computeYVisible.value;
481
513
  const defaultSlot = slots.default;
482
514
  return h('div', {
483
515
  ref: refElem,
@@ -485,14 +517,14 @@ export default defineVxeComponent({
485
517
  class: wrapperClss,
486
518
  style: wrapperStyle
487
519
  }, [
488
- h('div', Object.assign({ ref: refViewElem, class: viewClss, onScroll: scrollEvent }, viewAttrs), [
520
+ h('div', Object.assign({ ref: refViewElem, class: viewClss, onScroll: scrollEvent, id: viewId || null }, viewAttrs), [
489
521
  h('div', {
490
522
  key: 'vi',
491
523
  ref: refViewInnerElem,
492
524
  class: viewInnerClss
493
525
  }, defaultSlot ? defaultSlot({}) : [])
494
526
  ]),
495
- native || xOpts.visible === 'hidden'
527
+ native || xVisible === false
496
528
  ? renderEmptyElement($xeScrollbar)
497
529
  : h('div', {
498
530
  ref: refTrackXElem,
@@ -509,7 +541,7 @@ export default defineVxeComponent({
509
541
  onLostpointercapture: cleatPointerThumbEvent
510
542
  })
511
543
  ]),
512
- native || yOpts.visible === 'hidden'
544
+ native || yVisible === false
513
545
  ? renderEmptyElement($xeScrollbar)
514
546
  : h('div', {
515
547
  ref: refTrackYElem,
@@ -557,6 +589,16 @@ export default defineVxeComponent({
557
589
  watch(() => props.syncResize, () => {
558
590
  reFlag.value++;
559
591
  });
592
+ watch(computeXVisible, () => {
593
+ nextTick(() => {
594
+ reFlag.value++;
595
+ });
596
+ });
597
+ watch(computeYVisible, () => {
598
+ nextTick(() => {
599
+ reFlag.value++;
600
+ });
601
+ });
560
602
  watch(reFlag, () => {
561
603
  $xeScrollbar.recalculate().then(() => {
562
604
  $xeScrollbar.recalculate();
@@ -36,6 +36,7 @@
36
36
  .vxe-scrollbar.is--native > .vxe-scrollbar--view::-webkit-scrollbar-thumb:active {
37
37
  background-color: var(--vxe-ui-scrollbar-thumb-active-background-color);
38
38
  }
39
+
39
40
  .vxe-scrollbar.ov-x--hidden > .vxe-scrollbar--view {
40
41
  overflow-x: hidden;
41
42
  }