vxe-pc-ui 4.18.22 → 4.19.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 (147) hide show
  1. package/dist/all.esm.js +1138 -1062
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/calendar/src/calendar.js +1 -1
  5. package/es/card/src/card.js +1 -1
  6. package/es/carousel/src/carousel.js +1 -1
  7. package/es/countdown/src/countdown.js +1 -1
  8. package/es/date-picker/src/date-picker.js +3 -3
  9. package/es/icon/style.css +1 -1
  10. package/es/icon-picker/src/icon-picker.js +1 -1
  11. package/es/layout-aside/src/layout-aside.js +22 -10
  12. package/es/layout-aside/style.css +2 -4
  13. package/es/layout-aside/style.min.css +1 -1
  14. package/es/layout-body/src/layout-body.js +19 -12
  15. package/es/layout-body/style.css +2 -3
  16. package/es/layout-body/style.min.css +1 -1
  17. package/es/list/src/list.js +1 -1
  18. package/es/menu/src/menu.js +10 -4
  19. package/es/menu/style.css +10 -2
  20. package/es/menu/style.min.css +1 -1
  21. package/es/scrollbar/src/scrollbar.js +61 -15
  22. package/es/scrollbar/style.css +18 -15
  23. package/es/scrollbar/style.min.css +1 -1
  24. package/es/select/src/select.js +2 -2
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/tabs/src/tabs.js +1 -1
  28. package/es/text-ellipsis/style.css +29 -10
  29. package/es/text-ellipsis/style.min.css +1 -1
  30. package/es/ui/index.js +8 -2
  31. package/es/ui/src/log.js +1 -1
  32. package/es/upload/src/upload.js +1 -1
  33. package/es/upload/style.css +5 -3
  34. package/es/upload/style.min.css +1 -1
  35. package/es/vxe-layout-aside/style.css +2 -4
  36. package/es/vxe-layout-aside/style.min.css +1 -1
  37. package/es/vxe-layout-body/style.css +2 -3
  38. package/es/vxe-layout-body/style.min.css +1 -1
  39. package/es/vxe-menu/style.css +10 -2
  40. package/es/vxe-menu/style.min.css +1 -1
  41. package/es/vxe-scrollbar/style.css +18 -15
  42. package/es/vxe-scrollbar/style.min.css +1 -1
  43. package/es/vxe-text-ellipsis/style.css +29 -10
  44. package/es/vxe-text-ellipsis/style.min.css +1 -1
  45. package/es/vxe-upload/style.css +5 -3
  46. package/es/vxe-upload/style.min.css +1 -1
  47. package/lib/calendar/src/calendar.js +1 -1
  48. package/lib/calendar/src/calendar.min.js +1 -1
  49. package/lib/card/src/card.js +1 -1
  50. package/lib/card/src/card.min.js +1 -1
  51. package/lib/carousel/src/carousel.js +1 -1
  52. package/lib/carousel/src/carousel.min.js +1 -1
  53. package/lib/countdown/src/countdown.js +1 -1
  54. package/lib/countdown/src/countdown.min.js +1 -1
  55. package/lib/date-picker/src/date-picker.js +3 -3
  56. package/lib/date-picker/src/date-picker.min.js +1 -1
  57. package/lib/icon/style/style.css +1 -1
  58. package/lib/icon/style/style.min.css +1 -1
  59. package/lib/icon-picker/src/icon-picker.js +1 -1
  60. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  61. package/lib/index.umd.js +1059 -952
  62. package/lib/index.umd.min.js +1 -1
  63. package/lib/layout-aside/src/layout-aside.js +29 -10
  64. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  65. package/lib/layout-aside/style/style.css +2 -4
  66. package/lib/layout-aside/style/style.min.css +1 -1
  67. package/lib/layout-body/src/layout-body.js +29 -12
  68. package/lib/layout-body/src/layout-body.min.js +1 -1
  69. package/lib/layout-body/style/style.css +2 -3
  70. package/lib/layout-body/style/style.min.css +1 -1
  71. package/lib/list/src/list.js +1 -1
  72. package/lib/list/src/list.min.js +1 -1
  73. package/lib/menu/src/menu.js +11 -3
  74. package/lib/menu/src/menu.min.js +1 -1
  75. package/lib/menu/style/style.css +10 -2
  76. package/lib/menu/style/style.min.css +1 -1
  77. package/lib/scrollbar/src/scrollbar.js +66 -12
  78. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  79. package/lib/scrollbar/style/style.css +18 -15
  80. package/lib/scrollbar/style/style.min.css +1 -1
  81. package/lib/select/src/select.js +2 -2
  82. package/lib/select/src/select.min.js +1 -1
  83. package/lib/style.css +1 -1
  84. package/lib/style.min.css +1 -1
  85. package/lib/tabs/src/tabs.js +1 -1
  86. package/lib/tabs/src/tabs.min.js +1 -1
  87. package/lib/text-ellipsis/style/style.css +29 -10
  88. package/lib/text-ellipsis/style/style.min.css +1 -1
  89. package/lib/ui/index.js +8 -2
  90. package/lib/ui/index.min.js +1 -1
  91. package/lib/ui/src/log.js +1 -1
  92. package/lib/ui/src/log.min.js +1 -1
  93. package/lib/upload/src/upload.js +1 -1
  94. package/lib/upload/src/upload.min.js +1 -1
  95. package/lib/upload/style/style.css +5 -3
  96. package/lib/upload/style/style.min.css +1 -1
  97. package/lib/vxe-layout-aside/style/style.css +2 -4
  98. package/lib/vxe-layout-aside/style/style.min.css +1 -1
  99. package/lib/vxe-layout-body/style/style.css +2 -3
  100. package/lib/vxe-layout-body/style/style.min.css +1 -1
  101. package/lib/vxe-menu/style/style.css +10 -2
  102. package/lib/vxe-menu/style/style.min.css +1 -1
  103. package/lib/vxe-scrollbar/style/style.css +18 -15
  104. package/lib/vxe-scrollbar/style/style.min.css +1 -1
  105. package/lib/vxe-text-ellipsis/style/style.css +29 -10
  106. package/lib/vxe-text-ellipsis/style/style.min.css +1 -1
  107. package/lib/vxe-upload/style/style.css +5 -3
  108. package/lib/vxe-upload/style/style.min.css +1 -1
  109. package/package.json +2 -2
  110. package/packages/calendar/src/calendar.ts +1 -1
  111. package/packages/card/src/card.ts +1 -1
  112. package/packages/carousel/src/carousel.ts +1 -1
  113. package/packages/countdown/src/countdown.ts +1 -1
  114. package/packages/date-picker/src/date-picker.ts +3 -3
  115. package/packages/icon-picker/src/icon-picker.ts +1 -1
  116. package/packages/layout-aside/src/layout-aside.ts +23 -10
  117. package/packages/layout-body/src/layout-body.ts +23 -12
  118. package/packages/list/src/list.ts +1 -1
  119. package/packages/menu/src/menu.ts +14 -4
  120. package/packages/scrollbar/src/scrollbar.ts +63 -11
  121. package/packages/select/src/select.ts +2 -2
  122. package/packages/tabs/src/tabs.ts +1 -1
  123. package/packages/ui/index.ts +8 -3
  124. package/packages/upload/src/upload.ts +1 -1
  125. package/styles/components/layout-aside.scss +2 -4
  126. package/styles/components/layout-body.scss +2 -3
  127. package/styles/components/menu.scss +11 -2
  128. package/styles/components/scrollbar.scss +26 -19
  129. package/styles/components/text-ellipsis.scss +23 -64
  130. package/styles/components/upload.scss +5 -3
  131. package/styles/theme/base.scss +2 -0
  132. package/types/components/layout-aside.d.ts +3 -0
  133. package/types/components/layout-body.d.ts +3 -1
  134. package/types/components/menu.d.ts +3 -0
  135. package/types/components/scrollbar.d.ts +15 -0
  136. /package/es/icon/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
  137. /package/es/icon/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
  138. /package/es/icon/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
  139. /package/es/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
  140. /package/es/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
  141. /package/es/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
  142. /package/lib/icon/style/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
  143. /package/lib/icon/style/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
  144. /package/lib/icon/style/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
  145. /package/lib/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
  146. /package/lib/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
  147. /package/lib/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
@@ -32,6 +32,7 @@ function createInternalData (): ScrollbarInternalData {
32
32
  export default defineVxeComponent({
33
33
  name: 'VxeScrollbar',
34
34
  props: {
35
+ id: [String, Number] as PropType<VxeScrollbarPropTypes.Id>,
35
36
  width: [String, Number] as PropType<VxeScrollbarPropTypes.Width>,
36
37
  height: [String, Number] as PropType<VxeScrollbarPropTypes.Height>,
37
38
  minWidth: [String, Number] as PropType<VxeScrollbarPropTypes.MinWidth>,
@@ -45,8 +46,22 @@ export default defineVxeComponent({
45
46
  },
46
47
  xConfig: Object as PropType<VxeScrollbarPropTypes.XConfig>,
47
48
  yConfig: Object as PropType<VxeScrollbarPropTypes.YConfig>,
48
- className: String as PropType<VxeScrollbarPropTypes.ClassName>,
49
- viewClassName: String as PropType<VxeScrollbarPropTypes.ViewClassName>,
49
+ className: {
50
+ type: String as PropType<VxeScrollbarPropTypes.ClassName>,
51
+ default: () => getConfig().scrollbar.className
52
+ },
53
+ viewAttrs: {
54
+ type: Object as PropType<VxeScrollbarPropTypes.ViewAttrs>,
55
+ default: () => getConfig().scrollbar.viewAttrs
56
+ },
57
+ viewClassName: {
58
+ type: String as PropType<VxeScrollbarPropTypes.ViewClassName>,
59
+ default: () => getConfig().scrollbar.viewClassName
60
+ },
61
+ viewInnerClassName: {
62
+ type: String as PropType<VxeScrollbarPropTypes.ViewInnerClassName>,
63
+ default: () => getConfig().scrollbar.viewInnerClassName
64
+ },
50
65
  autoResize: {
51
66
  type: Boolean as PropType<VxeScrollbarPropTypes.AutoResize>,
52
67
  default: () => getConfig().scrollbar.autoResize
@@ -108,6 +123,7 @@ export default defineVxeComponent({
108
123
 
109
124
  const computeWrapperClss = computed(() => {
110
125
  const { native, className } = props
126
+ const { yThumbHeight, xThumbWidth } = reactData
111
127
  const xOpts = computeXOpts.value
112
128
  const yOpts = computeYOpts.value
113
129
  return domUtils.buildClass([
@@ -118,7 +134,9 @@ export default defineVxeComponent({
118
134
  className
119
135
  ], {
120
136
  'ov-x--auto-hide': xOpts.autoHide,
121
- 'ov-y--auto-hide': yOpts.autoHide
137
+ 'ov-y--auto-hide': yOpts.autoHide,
138
+ 'overflow-y': yThumbHeight,
139
+ 'overflow-x': xThumbWidth
122
140
  })
123
141
  })
124
142
 
@@ -130,6 +148,14 @@ export default defineVxeComponent({
130
148
  ])
131
149
  })
132
150
 
151
+ const computeViewInnerClss = computed(() => {
152
+ const { viewInnerClassName } = props
153
+ return domUtils.buildClass([
154
+ 'vxe-scrollbar--view-inner',
155
+ viewInnerClassName
156
+ ])
157
+ })
158
+
133
159
  const computeXOpts = computed(() => {
134
160
  return Object.assign({}, getConfig().scrollbar.xConfig, props.xConfig)
135
161
  })
@@ -427,26 +453,30 @@ export default defineVxeComponent({
427
453
  Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods)
428
454
 
429
455
  const renderVN = () => {
430
- const { native, loading } = props
456
+ const { id, native, loading, viewAttrs } = props
431
457
  const wrapperStyle = computeWrapperStyle.value
432
458
  const wrapperClss = computeWrapperClss.value
433
459
  const viewClss = computeViewClss.value
460
+ const viewInnerClss = computeViewInnerClss.value
434
461
  const xOpts = computeXOpts.value
435
462
  const yOpts = computeYOpts.value
436
463
  const defaultSlot = slots.default
437
464
  return h('div', {
438
465
  ref: refElem,
466
+ id: id || null,
439
467
  class: wrapperClss,
440
468
  style: wrapperStyle
441
469
  }, [
442
470
  h('div', {
443
471
  ref: refViewElem,
444
472
  class: viewClss,
445
- onScroll: scrollEvent
473
+ onScroll: scrollEvent,
474
+ ...viewAttrs
446
475
  }, [
447
476
  h('div', {
477
+ key: 'vi',
448
478
  ref: refViewInnerElem,
449
- class: 'vxe-scrollbar--view-inner'
479
+ class: viewInnerClss
450
480
  }, defaultSlot ? defaultSlot({}) : [])
451
481
  ]),
452
482
  native || xOpts.visible === 'hidden'
@@ -492,6 +522,24 @@ export default defineVxeComponent({
492
522
 
493
523
  const reFlag = ref(0)
494
524
 
525
+ watch(() => props.height, () => {
526
+ reFlag.value++
527
+ })
528
+ watch(() => props.width, () => {
529
+ reFlag.value++
530
+ })
531
+ watch(() => props.minHeight, () => {
532
+ reFlag.value++
533
+ })
534
+ watch(() => props.minWidth, () => {
535
+ reFlag.value++
536
+ })
537
+ watch(() => props.maxHeight, () => {
538
+ reFlag.value++
539
+ })
540
+ watch(() => props.maxWidth, () => {
541
+ reFlag.value++
542
+ })
495
543
  watch(() => props.native, () => {
496
544
  reFlag.value++
497
545
  })
@@ -506,20 +554,24 @@ export default defineVxeComponent({
506
554
 
507
555
  onMounted(() => {
508
556
  const { autoResize } = props
557
+ const viewEl = refViewElem.value
509
558
  const viewInnerEl = refViewInnerElem.value
510
- if (autoResize && viewInnerEl) {
559
+ if (autoResize) {
511
560
  const resizeObserver = globalResize.create(() => {
512
561
  if (props.autoResize) {
513
562
  reFlag.value++
514
563
  }
515
564
  })
516
- resizeObserver.observe(viewInnerEl)
565
+ if (viewEl) {
566
+ resizeObserver.observe(viewEl)
567
+ }
568
+ if (viewInnerEl) {
569
+ resizeObserver.observe(viewInnerEl)
570
+ }
517
571
  internalData.resizeObserver = resizeObserver
518
572
  }
519
573
 
520
- nextTick(() => {
521
- $xeScrollbar.recalculate()
522
- })
574
+ reFlag.value++
523
575
  })
524
576
 
525
577
  onBeforeUnmount(() => {
@@ -6,8 +6,8 @@ import { getEventTargetNode, getPopupContainer, toCssUnit, updatePanelPlacement
6
6
  import { getLastZIndex, nextZIndex, getFuncText, eqEmptyValue } from '../../ui/src/utils'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
  import { createComponentLog } from '../../ui/src/log'
9
- import VxeInputComponent from '../../input/src/input'
10
- import VxeButtonComponent from '../../button/src/button'
9
+ import VxeInputComponent from '../../input'
10
+ import VxeButtonComponent from '../../button'
11
11
 
12
12
  import type { VxeSelectPropTypes, VxeSelectConstructor, SelectInternalData, SelectReactData, VxeSelectDefines, VxeButtonEvents, ValueOf, VxeSelectEmits, VxeComponentSlotType, VxeInputConstructor, SelectMethods, SelectPrivateRef, VxeSelectMethods, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputEvents, VxeComponentStyleType, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
13
13
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
@@ -6,7 +6,7 @@ import { toCssUnit, addClass, removeClass } from '../../ui/src/dom'
6
6
  import { isEnableConf } from '../../ui/src/utils'
7
7
  import { createComponentLog } from '../../ui/src/log'
8
8
  import XEUtils from 'xe-utils'
9
- import VxeLoadingComponent from '../../loading/src/loading'
9
+ import VxeLoadingComponent from '../../loading'
10
10
 
11
11
  import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, TabsPrivateRef, VxeTabsPrivateComputed, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, TabsMethods, TabsPrivateMethods, VxeComponentStyleType } from '../../../types'
12
12
 
@@ -221,11 +221,16 @@ setConfig({
221
221
  digits: 2,
222
222
  controls: true
223
223
  },
224
- layoutAside: {},
225
- layoutBody: {
226
- backtopConfig: {
224
+ layoutAside: {
225
+ scrollbarConfig: {
226
+ yConfig: {
227
+ autoHide: true
228
+ }
227
229
  }
228
230
  },
231
+ layoutBody: {
232
+ backtopConfig: {}
233
+ },
229
234
  layoutContainer: {},
230
235
  layoutFooter: {},
231
236
  layoutHeader: {},
@@ -6,7 +6,7 @@ import { getSlotVNs } from '../../ui/src/vn'
6
6
  import { createComponentLog } from '../../ui/src/log'
7
7
  import { initTpImg, getTpImg, getEventTargetNode, toCssUnit } from '../../ui/src/dom'
8
8
  import { readLocalFile } from './util'
9
- import VxeButtonComponent from '../../button/src/button'
9
+ import VxeButtonComponent from '../../button'
10
10
 
11
11
  import type { VxeUploadDefines, VxeUploadPropTypes, UploadReactData, UploadInternalData, UploadPrivateMethods, UploadMethods, VxeUploadEmits, UploadPrivateRef, VxeUploadPrivateComputed, VxeUploadConstructor, VxeUploadPrivateMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, ValueOf, VxeComponentEventParams } from '../../../types'
12
12
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
@@ -15,9 +15,7 @@
15
15
  padding: var(--vxe-ui-layout-padding-default);
16
16
  }
17
17
  }
18
- .vxe-layout-aside--inner {
18
+ .vxe-layout-aside--scrollbar {
19
19
  flex-grow: 1;
20
- overflow-y: auto;
21
- overflow-x: hidden;
22
- outline: 0;
20
+ overflow: hidden;
23
21
  }
@@ -8,8 +8,7 @@
8
8
  padding: var(--vxe-ui-layout-padding-double);
9
9
  }
10
10
  }
11
- .vxe-layout-body--inner {
11
+ .vxe-layout-body--scrollbar {
12
12
  flex-grow: 1;
13
- overflow: auto;
14
- outline: 0;
13
+ overflow: hidden;
15
14
  }
@@ -98,11 +98,12 @@
98
98
 
99
99
  .vxe-menu--collapse-wrapper {
100
100
  display: none;
101
+ flex-direction: column;
101
102
  position: absolute;
102
- overflow: auto;
103
+ overflow: hidden;
103
104
  background-color: var(--vxe-ui-layout-background-color);
104
105
  &.is--collapsed {
105
- display: block;
106
+ display: flex;
106
107
  @include baseMixin.createAnimationTransition(all, 0.25s);
107
108
  }
108
109
  &:not(.is--enter) {
@@ -117,6 +118,14 @@
117
118
  width: var(--vxe-ui-layout-aside-default-width);
118
119
  box-shadow: var(--vxe-ui-menu-collapse-wrapper-box-shadow);
119
120
  }
121
+ & > .vxe-menu--header,
122
+ & > .vxe-menu--footer {
123
+ flex-shrink: 0;
124
+ }
125
+ & > .vxe-menu--body {
126
+ flex-grow: 1;
127
+ overflow: hidden;
128
+ }
120
129
  }
121
130
 
122
131
  .vxe-menu--item-link {
@@ -7,8 +7,6 @@
7
7
  & > .vxe-scrollbar--view {
8
8
  scrollbar-width: none;
9
9
  -ms-overflow-style: none;
10
- overflow-x: auto;
11
- overflow-y: auto;
12
10
  }
13
11
  & > .vxe-scrollbar--view::-webkit-scrollbar {
14
12
  display: none;
@@ -21,7 +19,7 @@
21
19
  }
22
20
  & > .vxe-scrollbar--track-x {
23
21
  opacity: 0;
24
- @include baseMixin.createAnimationTransition(opacity, 0.3s);
22
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
25
23
  }
26
24
  }
27
25
  &.ov-y--auto-hide {
@@ -32,25 +30,11 @@
32
30
  }
33
31
  & > .vxe-scrollbar--track-y {
34
32
  opacity: 0;
35
- @include baseMixin.createAnimationTransition(opacity, 0.3s);
33
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
36
34
  }
37
35
  }
38
36
  }
39
37
  &.is--native {
40
- & > .vxe-scrollbar--view {
41
- overflow-x: auto;
42
- overflow-y: auto;
43
- }
44
- &.ov-x--hidden {
45
- & > .vxe-scrollbar--view {
46
- overflow-x: hidden;
47
- }
48
- }
49
- &.ov-y--hidden {
50
- & > .vxe-scrollbar--view {
51
- overflow-y: hidden;
52
- }
53
- }
54
38
  & > .vxe-scrollbar--view::-webkit-scrollbar {
55
39
  width: var(--vxe-ui-scrollbar-y-width);
56
40
  height: var(--vxe-ui-scrollbar-x-height);
@@ -66,25 +50,47 @@
66
50
  background-color: var(--vxe-ui-scrollbar-thumb-active-background-color);
67
51
  }
68
52
  }
53
+ &.ov-x--hidden {
54
+ & > .vxe-scrollbar--view {
55
+ overflow-x: hidden;
56
+ }
57
+ }
58
+ &.ov-y--hidden {
59
+ & > .vxe-scrollbar--view {
60
+ overflow-y: hidden;
61
+ }
62
+ }
69
63
  }
70
64
 
71
65
  .vxe-scrollbar--view {
72
66
  height: 100%;
73
67
  width: 100%;
68
+ overflow-x: auto;
69
+ overflow-y: auto;
74
70
  }
75
71
 
76
72
  .vxe-scrollbar--track-x,
77
73
  .vxe-scrollbar--track-y {
74
+ display: none;
78
75
  position: absolute;
79
76
  background-color: var(--vxe-ui-scrollbar-track-background-color);
80
77
  user-select: none;
81
78
  }
79
+ .vxe-scrollbar {
80
+ &.overflow-y {
81
+ & > .vxe-scrollbar--track-x,
82
+ & > .vxe-scrollbar--track-y {
83
+ display: block;
84
+ }
85
+ }
86
+ }
82
87
 
83
88
  .vxe-scrollbar--track-x {
84
89
  width: 100%;
85
90
  bottom: 0;
86
91
  left: 0;
87
92
  height: var(--vxe-ui-scrollbar-x-height);
93
+ padding: var(--vxe-ui-scrollbar-track-padding) 0;
88
94
  }
89
95
 
90
96
  .vxe-scrollbar--track-y {
@@ -92,6 +98,7 @@
92
98
  right: 0;
93
99
  top: 0;
94
100
  width: var(--vxe-ui-scrollbar-y-width);
101
+ padding: 0 var(--vxe-ui-scrollbar-track-padding);
95
102
  }
96
103
 
97
104
  .vxe-scrollbar--thumb-y {
@@ -103,7 +110,7 @@
103
110
 
104
111
  .vxe-scrollbar--thumb-x,
105
112
  .vxe-scrollbar--thumb-y {
106
- border-radius: var(--vxe-ui-base-border-radius);
113
+ border-radius: var(--vxe-ui-scrollbar-thumb-border-radius);
107
114
  background-color: var(--vxe-ui-scrollbar-thumb-background-color);
108
115
  &:hover {
109
116
  background-color: var(--vxe-ui-scrollbar-thumb-hover-background-color);
@@ -1,63 +1,34 @@
1
1
  @use "sass:map";
2
2
  @use "sass:list";
3
+ @use '../helpers/themeStatus.scss';
3
4
 
4
- $btnThemeList: (
5
- (
6
- name: "primary",
7
- textColor: var(--vxe-ui-font-primary-color),
8
- btnColor: #fff,
9
- btnLightenColor: var(--vxe-ui-font-primary-lighten-color),
10
- btnDarkenColor: var(--vxe-ui-font-primary-darken-color),
11
- btnDisabledColor: var(--vxe-ui-font-primary-disabled-color)
12
- ),
13
- (
14
- name: "success",
15
- textColor: var(--vxe-ui-status-success-color),
16
- btnColor: #fff,
17
- btnLightenColor: var(--vxe-ui-status-success-lighten-color),
18
- btnDarkenColor: var(--vxe-ui-status-success-darken-color),
19
- btnDisabledColor: var(--vxe-ui-status-success-disabled-color)
20
- ),
21
- (
22
- name: "info",
23
- textColor: var(--vxe-ui-status-info-color),
24
- btnColor: #fff,
25
- btnLightenColor: var(--vxe-ui-status-info-lighten-color),
26
- btnDarkenColor: var(--vxe-ui-status-info-darken-color),
27
- btnDisabledColor: var(--vxe-ui-status-info-disabled-color)
28
- ),
29
- (
30
- name: "warning",
31
- textColor: var(--vxe-ui-status-warning-color),
32
- btnColor: #fff,
33
- btnLightenColor: var(--vxe-ui-status-warning-lighten-color),
34
- btnDarkenColor: var(--vxe-ui-status-warning-darken-color),
35
- btnDisabledColor: var(--vxe-ui-status-warning-disabled-color)
36
- ),
37
- (
38
- name: "danger",
39
- textColor: var(--vxe-ui-status-danger-color),
40
- btnColor: #fff,
41
- btnLightenColor: var(--vxe-ui-status-danger-lighten-color),
42
- btnDarkenColor: var(--vxe-ui-status-danger-darken-color),
43
- btnDisabledColor: var(--vxe-ui-status-danger-disabled-color)
44
- ),
45
- (
46
- name: "error",
47
- textColor: var(--vxe-ui-status-error-color),
48
- btnColor: #fff,
49
- btnLightenColor: var(--vxe-ui-status-error-lighten-color),
50
- btnDarkenColor: var(--vxe-ui-status-error-darken-color),
51
- btnDisabledColor: var(--vxe-ui-status-error-disabled-color)
52
- )
53
- );
5
+ // 局部变量
6
+ .vxe-text-ellipsis {
7
+ --vxe-ui-text-ellipsis-current-font-size: inherit;
8
+ &.size--xlarge {
9
+ --vxe-ui-text-ellipsis-current-font-size: var(--vxe-ui-font-size-xlarge);
10
+ }
11
+ &.size--large {
12
+ --vxe-ui-text-ellipsis-current-font-size: var(--vxe-ui-font-size-large);
13
+ }
14
+ &.size--medium {
15
+ --vxe-ui-text-ellipsis-current-font-size: var(--vxe-ui-font-size-medium);
16
+ }
17
+ &.size--small {
18
+ --vxe-ui-text-ellipsis-current-font-size: var(--vxe-ui-font-size-small);
19
+ }
20
+ &.size--mini {
21
+ --vxe-ui-text-ellipsis-current-font-size: var(--vxe-ui-font-size-mini);
22
+ }
23
+ }
54
24
 
55
25
  .vxe-text-ellipsis {
56
26
  display: block;
57
27
  overflow: hidden;
58
28
  white-space: normal;
59
- @for $index from 0 to list.length($btnThemeList) {
60
- $item: list.nth($btnThemeList, $index + 1);
29
+ font-size: var(--vxe-ui-text-ellipsis-current-font-size);
30
+ @for $index from 0 to list.length(themeStatus.$btnThemeList) {
31
+ $item: list.nth(themeStatus.$btnThemeList, $index + 1);
61
32
  &.theme--#{map.get($item, name)} {
62
33
  color: map.get($item, textColor);
63
34
  & > .vxe-text-ellipsis--link {
@@ -117,15 +88,3 @@ $btnThemeList: (
117
88
  text-decoration: none;
118
89
  color: inherit;
119
90
  }
120
-
121
- .vxe-text-ellipsis {
122
- &.size--medium {
123
- font-size: var(--vxe-ui-font-size-medium);
124
- }
125
- &.size--small {
126
- font-size: var(--vxe-ui-font-size-small);
127
- }
128
- &.size--mini {
129
- font-size: var(--vxe-ui-font-size-mini);
130
- }
131
- }
@@ -412,9 +412,8 @@
412
412
  flex-direction: row;
413
413
  justify-content: center;
414
414
  align-items: center;
415
- width: 1.8em;
416
- height: 1.8em;
417
- font-size: 0.8em;
415
+ width: 1.2em;
416
+ height: 1.2em;
418
417
  border-radius: 50%;
419
418
  color: #fff;
420
419
  background-color: var(--vxe-ui-status-error-color);
@@ -423,6 +422,9 @@
423
422
  &:hover {
424
423
  background-color: var(--vxe-ui-status-error-lighten-color);
425
424
  }
425
+ i {
426
+ font-size: 0.6em;
427
+ }
426
428
  }
427
429
 
428
430
  .vxe-upload--file-message-over-error {
@@ -323,4 +323,6 @@
323
323
  --vxe-ui-scrollbar-y-width: 10px;
324
324
  --vxe-ui-scrollbar-x-height: var(--vxe-ui-scrollbar-y-width);
325
325
  --vxe-ui-scrollbar-track-background-color: transparent;
326
+ --vxe-ui-scrollbar-track-padding: 0;
327
+ --vxe-ui-scrollbar-thumb-border-radius: var(--vxe-ui-base-border-radius);
326
328
  }
@@ -1,5 +1,6 @@
1
1
  import { RenderFunction, ComputedRef, SetupContext, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType } from '@vxe-ui/core'
3
+ import { VxeScrollbarProps } from './scrollbar'
3
4
 
4
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
6
 
@@ -35,6 +36,7 @@ export namespace VxeLayoutAsidePropTypes {
35
36
  */
36
37
  animation?: boolean
37
38
  }
39
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'yConfig' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
38
40
  }
39
41
 
40
42
  export interface VxeLayoutAsideProps {
@@ -45,6 +47,7 @@ export interface VxeLayoutAsideProps {
45
47
  padding?: VxeLayoutAsidePropTypes.Padding
46
48
  size?: VxeLayoutAsidePropTypes.Size
47
49
  collapseConfig?: VxeLayoutAsidePropTypes.CollapseConfig
50
+ scrollbarConfig?: VxeLayoutAsidePropTypes.ScrollbarConfig
48
51
  }
49
52
  export interface LayoutAsidePrivateComputed {
50
53
  computeSize: ComputedRef<VxeLayoutAsidePropTypes.Size>
@@ -1,6 +1,7 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
3
3
  import { VxeBacktopProps, VxeBacktopSlotTypes } from './backtop'
4
+ import { VxeScrollbarProps } from './scrollbar'
4
5
 
5
6
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
6
7
 
@@ -30,14 +31,15 @@ export namespace VxeLayoutBodyPropTypes {
30
31
  export type Padding = boolean
31
32
  export type ShowBacktop = boolean
32
33
  export interface BacktopConfig extends Omit<VxeBacktopProps, 'target'> {}
34
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'xConfig' | 'yConfig' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
33
35
  }
34
-
35
36
  export interface VxeLayoutBodyProps {
36
37
  size?: VxeLayoutBodyPropTypes.Size
37
38
  loading?: VxeLayoutBodyPropTypes.Loading
38
39
  padding?: VxeLayoutBodyPropTypes.Padding
39
40
  showBacktop?: VxeLayoutBodyPropTypes.ShowBacktop
40
41
  backtopConfig?: VxeLayoutBodyPropTypes.BacktopConfig
42
+ scrollbarConfig?: VxeLayoutBodyPropTypes.ScrollbarConfig
41
43
  }
42
44
 
43
45
  export interface LayoutBodyPrivateComputed {
@@ -2,6 +2,7 @@ import { RenderFunction, SetupContext, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSlotType, VxeComponentStyleType, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentPermissionCodeType } from '@vxe-ui/core'
3
3
  import { VxeLinkPropTypes } from './link'
4
4
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
5
+ import { VxeScrollbarProps } from './scrollbar'
5
6
 
6
7
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
7
8
 
@@ -85,6 +86,7 @@ export namespace VxeMenuPropTypes {
85
86
  }): boolean
86
87
  }
87
88
  export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
89
+ export interface ScrollbarConfig extends VxeScrollbarProps {}
88
90
  }
89
91
 
90
92
  export interface VxeMenuProps {
@@ -106,6 +108,7 @@ export interface VxeMenuProps {
106
108
  expandKeys?: VxeMenuPropTypes.ExpandKeys
107
109
  options?: VxeMenuPropTypes.Options
108
110
  menuConfig?: VxeMenuPropTypes.MenuConfig
111
+ scrollbarConfig?: VxeMenuPropTypes.ScrollbarConfig
109
112
  /**
110
113
  * 挂载到指定元素下
111
114
  */
@@ -24,6 +24,7 @@ export interface ScrollbarPrivateRef {
24
24
  export interface VxeScrollbarPrivateRef extends ScrollbarPrivateRef { }
25
25
 
26
26
  export namespace VxeScrollbarPropTypes {
27
+ export type Id = number | string
27
28
  export type Width = number | string
28
29
  export type Height = number | string
29
30
  export type MinWidth = number | string
@@ -59,12 +60,18 @@ export namespace VxeScrollbarPropTypes {
59
60
  threshold?: string | number
60
61
  }
61
62
  export type ClassName = string
63
+ export type ViewAttrs = Record<string, any>
62
64
  export type ViewClassName = string
65
+ export type ViewInnerClassName = string
63
66
  export type AutoResize = boolean
64
67
  export type SyncResize = boolean
65
68
  }
66
69
 
67
70
  export interface VxeScrollbarProps {
71
+ /**
72
+ * ID
73
+ */
74
+ id?: VxeScrollbarPropTypes.Id
68
75
  /**
69
76
  * 容器宽度
70
77
  */
@@ -109,10 +116,18 @@ export interface VxeScrollbarProps {
109
116
  * 给容器附加 class
110
117
  */
111
118
  className?: VxeScrollbarPropTypes.ClassName
119
+ /**
120
+ * 给视图元素附加属性
121
+ */
122
+ viewAttrs?: VxeScrollbarPropTypes.ViewAttrs
112
123
  /**
113
124
  * 给视图元素附加 class
114
125
  */
115
126
  viewClassName?: VxeScrollbarPropTypes.ViewClassName
127
+ /**
128
+ * 给视图内元素附加 class
129
+ */
130
+ viewInnerClassName?: VxeScrollbarPropTypes.ViewInnerClassName
116
131
  /**
117
132
  * 自动监听元素的变化去重新计算样式
118
133
  */