vxe-pc-ui 3.18.23 → 3.19.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 (139) hide show
  1. package/es/calendar/src/calendar.js +1 -1
  2. package/es/card/src/card.js +1 -1
  3. package/es/carousel/src/carousel.js +1 -1
  4. package/es/countdown/src/countdown.js +1 -1
  5. package/es/date-range-picker/src/date-range-picker.js +3 -3
  6. package/es/icon/style.css +1 -1
  7. package/es/icon-picker/src/icon-picker.js +1 -1
  8. package/es/layout-aside/src/layout-aside.js +36 -6
  9. package/es/layout-aside/style.css +5 -0
  10. package/es/layout-aside/style.min.css +1 -1
  11. package/es/layout-body/src/layout-body.js +36 -8
  12. package/es/layout-body/style.css +5 -1
  13. package/es/layout-body/style.min.css +1 -1
  14. package/es/list/src/list.js +1 -1
  15. package/es/menu/src/menu.js +26 -5
  16. package/es/menu/style.css +14 -2
  17. package/es/menu/style.min.css +1 -1
  18. package/es/scrollbar/src/scrollbar.js +40 -14
  19. package/es/scrollbar/style.css +16 -13
  20. package/es/scrollbar/style.min.css +1 -1
  21. package/es/select/src/select.js +2 -2
  22. package/es/style.css +1 -1
  23. package/es/style.min.css +1 -1
  24. package/es/table-select/src/table-select.js +1 -1
  25. package/es/tabs/src/tabs.js +1 -1
  26. package/es/text-ellipsis/style.css +29 -10
  27. package/es/text-ellipsis/style.min.css +1 -1
  28. package/es/ui/index.js +8 -2
  29. package/es/ui/src/log.js +1 -1
  30. package/es/upload/src/upload.js +1 -1
  31. package/es/vxe-layout-aside/style.css +5 -0
  32. package/es/vxe-layout-aside/style.min.css +1 -1
  33. package/es/vxe-layout-body/style.css +5 -1
  34. package/es/vxe-layout-body/style.min.css +1 -1
  35. package/es/vxe-menu/style.css +14 -2
  36. package/es/vxe-menu/style.min.css +1 -1
  37. package/es/vxe-scrollbar/style.css +16 -13
  38. package/es/vxe-scrollbar/style.min.css +1 -1
  39. package/es/vxe-text-ellipsis/style.css +29 -10
  40. package/es/vxe-text-ellipsis/style.min.css +1 -1
  41. package/lib/calendar/src/calendar.js +1 -1
  42. package/lib/calendar/src/calendar.min.js +1 -1
  43. package/lib/card/src/card.js +1 -1
  44. package/lib/card/src/card.min.js +1 -1
  45. package/lib/carousel/src/carousel.js +1 -1
  46. package/lib/carousel/src/carousel.min.js +1 -1
  47. package/lib/countdown/src/countdown.js +1 -1
  48. package/lib/countdown/src/countdown.min.js +1 -1
  49. package/lib/date-range-picker/src/date-range-picker.js +3 -3
  50. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  51. package/lib/icon/style/style.css +1 -1
  52. package/lib/icon/style/style.min.css +1 -1
  53. package/lib/icon-picker/src/icon-picker.js +1 -1
  54. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  55. package/lib/index.umd.js +1518 -1368
  56. package/lib/index.umd.min.js +1 -1
  57. package/lib/layout-aside/src/layout-aside.js +42 -4
  58. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  59. package/lib/layout-aside/style/style.css +5 -0
  60. package/lib/layout-aside/style/style.min.css +1 -1
  61. package/lib/layout-body/src/layout-body.js +42 -3
  62. package/lib/layout-body/src/layout-body.min.js +1 -1
  63. package/lib/layout-body/style/style.css +5 -1
  64. package/lib/layout-body/style/style.min.css +1 -1
  65. package/lib/list/src/list.js +1 -1
  66. package/lib/list/src/list.min.js +1 -1
  67. package/lib/menu/src/menu.js +33 -3
  68. package/lib/menu/src/menu.min.js +1 -1
  69. package/lib/menu/style/style.css +14 -2
  70. package/lib/menu/style/style.min.css +1 -1
  71. package/lib/scrollbar/src/scrollbar.js +47 -10
  72. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  73. package/lib/scrollbar/style/style.css +16 -13
  74. package/lib/scrollbar/style/style.min.css +1 -1
  75. package/lib/select/src/select.js +2 -2
  76. package/lib/select/src/select.min.js +1 -1
  77. package/lib/style.css +1 -1
  78. package/lib/style.min.css +1 -1
  79. package/lib/table-select/src/table-select.js +1 -1
  80. package/lib/table-select/src/table-select.min.js +1 -1
  81. package/lib/tabs/src/tabs.js +1 -1
  82. package/lib/tabs/src/tabs.min.js +1 -1
  83. package/lib/text-ellipsis/style/style.css +29 -10
  84. package/lib/text-ellipsis/style/style.min.css +1 -1
  85. package/lib/ui/index.js +8 -2
  86. package/lib/ui/index.min.js +1 -1
  87. package/lib/ui/src/log.js +1 -1
  88. package/lib/ui/src/log.min.js +1 -1
  89. package/lib/upload/src/upload.js +1 -1
  90. package/lib/upload/src/upload.min.js +1 -1
  91. package/lib/vxe-layout-aside/style/style.css +5 -0
  92. package/lib/vxe-layout-aside/style/style.min.css +1 -1
  93. package/lib/vxe-layout-body/style/style.css +5 -1
  94. package/lib/vxe-layout-body/style/style.min.css +1 -1
  95. package/lib/vxe-menu/style/style.css +14 -2
  96. package/lib/vxe-menu/style/style.min.css +1 -1
  97. package/lib/vxe-scrollbar/style/style.css +16 -13
  98. package/lib/vxe-scrollbar/style/style.min.css +1 -1
  99. package/lib/vxe-text-ellipsis/style/style.css +29 -10
  100. package/lib/vxe-text-ellipsis/style/style.min.css +1 -1
  101. package/package.json +2 -2
  102. package/packages/calendar/src/calendar.ts +1 -1
  103. package/packages/card/src/card.ts +1 -1
  104. package/packages/carousel/src/carousel.ts +1 -1
  105. package/packages/countdown/src/countdown.ts +1 -1
  106. package/packages/date-range-picker/src/date-range-picker.ts +3 -3
  107. package/packages/icon-picker/src/icon-picker.ts +1 -1
  108. package/packages/layout-aside/src/layout-aside.ts +37 -6
  109. package/packages/layout-body/src/layout-body.ts +40 -8
  110. package/packages/list/src/list.ts +1 -1
  111. package/packages/menu/src/menu.ts +31 -5
  112. package/packages/scrollbar/src/scrollbar.ts +41 -14
  113. package/packages/select/src/select.ts +2 -2
  114. package/packages/table-select/src/table-select.ts +1 -1
  115. package/packages/tabs/src/tabs.ts +1 -1
  116. package/packages/ui/index.ts +8 -3
  117. package/packages/upload/src/upload.ts +1 -1
  118. package/styles/components/layout-aside.scss +5 -0
  119. package/styles/components/layout-body.scss +4 -1
  120. package/styles/components/menu.scss +15 -2
  121. package/styles/components/scrollbar.scss +24 -17
  122. package/styles/components/text-ellipsis.scss +23 -64
  123. package/styles/theme/base.scss +2 -0
  124. package/types/components/layout-aside.d.ts +5 -0
  125. package/types/components/layout-body.d.ts +5 -1
  126. package/types/components/menu.d.ts +5 -0
  127. package/types/components/scrollbar.d.ts +16 -0
  128. /package/es/icon/{iconfont.1791517840480.ttf → iconfont.1791542927686.ttf} +0 -0
  129. /package/es/icon/{iconfont.1791517840480.woff → iconfont.1791542927686.woff} +0 -0
  130. /package/es/icon/{iconfont.1791517840480.woff2 → iconfont.1791542927686.woff2} +0 -0
  131. /package/es/{iconfont.1791517840480.ttf → iconfont.1791542927686.ttf} +0 -0
  132. /package/es/{iconfont.1791517840480.woff → iconfont.1791542927686.woff} +0 -0
  133. /package/es/{iconfont.1791517840480.woff2 → iconfont.1791542927686.woff2} +0 -0
  134. /package/lib/icon/style/{iconfont.1791517840480.ttf → iconfont.1791542927686.ttf} +0 -0
  135. /package/lib/icon/style/{iconfont.1791517840480.woff → iconfont.1791542927686.woff} +0 -0
  136. /package/lib/icon/style/{iconfont.1791517840480.woff2 → iconfont.1791542927686.woff2} +0 -0
  137. /package/lib/{iconfont.1791517840480.ttf → iconfont.1791542927686.ttf} +0 -0
  138. /package/lib/{iconfont.1791517840480.woff → iconfont.1791542927686.woff} +0 -0
  139. /package/lib/{iconfont.1791517840480.woff2 → iconfont.1791542927686.woff2} +0 -0
@@ -32,6 +32,7 @@ function createInternalData (): ScrollbarInternalData {
32
32
  export default /* define-vxe-component start */ 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 /* define-vxe-component start */ 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
@@ -105,8 +120,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
105
120
  computeWrapperClss () {
106
121
  const $xeScrollbar = this
107
122
  const props = $xeScrollbar
123
+ const reactData = $xeScrollbar.reactData
108
124
 
109
125
  const { native, className } = props
126
+ const { yThumbHeight, xThumbWidth } = reactData
110
127
  const xOpts = ($xeScrollbar as any).computeXOpts as VxeScrollbarPropTypes.XConfig
111
128
  const yOpts = ($xeScrollbar as any).computeYOpts as VxeScrollbarPropTypes.YConfig
112
129
  return domUtils.buildClass([
@@ -117,7 +134,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
117
134
  className
118
135
  ], {
119
136
  'ov-x--auto-hide': xOpts.autoHide,
120
- 'ov-y--auto-hide': yOpts.autoHide
137
+ 'ov-y--auto-hide': yOpts.autoHide,
138
+ 'overflow-y': yThumbHeight,
139
+ 'overflow-x': xThumbWidth
121
140
  })
122
141
  },
123
142
  computeViewClss () {
@@ -130,6 +149,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
130
149
  viewClassName
131
150
  ])
132
151
  },
152
+ computeViewInnerClss () {
153
+ const $xeScrollbar = this
154
+ const props = $xeScrollbar
155
+
156
+ const { viewInnerClassName } = props
157
+ return domUtils.buildClass([
158
+ 'vxe-scrollbar--view-inner',
159
+ viewInnerClassName
160
+ ])
161
+ },
133
162
  computeXOpts () {
134
163
  const $xeScrollbar = this
135
164
  const props = $xeScrollbar
@@ -441,37 +470,35 @@ export default /* define-vxe-component start */ defineVxeComponent({
441
470
  const props = $xeScrollbar
442
471
  const slots = $xeScrollbar.$scopedSlots
443
472
 
444
- const { native, loading, autoResize } = props
473
+ const { id, native, loading, viewAttrs } = props
445
474
  const wrapperStyle = $xeScrollbar.computeWrapperStyle
446
475
  const wrapperClss = $xeScrollbar.computeWrapperClss
447
476
  const viewClss = $xeScrollbar.computeViewClss
477
+ const viewInnerClss = $xeScrollbar.computeViewInnerClss
448
478
  const xOpts = $xeScrollbar.computeXOpts
449
479
  const yOpts = $xeScrollbar.computeYOpts
450
480
  const defaultSlot = slots.default
451
481
  return h('div', {
452
482
  ref: 'refElem',
483
+ attrs: {
484
+ id: id || null
485
+ },
453
486
  class: wrapperClss,
454
487
  style: wrapperStyle
455
488
  }, [
456
489
  h('div', {
457
490
  ref: 'refViewElem',
458
491
  class: viewClss,
492
+ attrs: viewAttrs,
459
493
  on: {
460
494
  scroll: $xeScrollbar.scrollEvent
461
495
  }
462
496
  }, [
463
497
  h('div', {
498
+ key: 'vi',
464
499
  ref: 'refViewInnerElem',
465
- class: 'vxe-scrollbar--view-inner'
466
- }, autoResize
467
- ? [
468
- h('div', {
469
- key: 'vi',
470
- ref: 'refViewInnerElem',
471
- class: 'vxe-scrollbar--view-inner'
472
- }, defaultSlot ? defaultSlot({}) : [])
473
- ]
474
- : defaultSlot ? defaultSlot({}) : [])
500
+ class: viewInnerClss
501
+ }, defaultSlot ? defaultSlot({}) : [])
475
502
  ]),
476
503
  native || xOpts.visible === 'hidden'
477
504
  ? renderEmptyElement($xeScrollbar)
@@ -6,8 +6,8 @@ import { getEventTargetNode, getPopupAppendElement, toCssUnit, updatePanelPlacem
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, SelectInternalData, ValueOf, VxeComponentSizeType, SelectReactData, VxeSelectEmits, VxeButtonDefines, VxeInputDefines, VxeSelectDefines, VxeOptionProps, VxeDrawerConstructor, VxeDrawerMethods, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, VxeModalConstructor, VxeModalMethods, VxeInputConstructor, VxeComponentSlotType, VxeComponentStyleType, VxeCardConstructor, VxeCardPrivateMethods } from '../../../types'
13
13
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
@@ -6,7 +6,7 @@ import { getEventTargetNode, updatePanelPlacement, toCssUnit, getPopupAppendElem
6
6
  import { getOnName } from '../../ui/src/vn'
7
7
  import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
8
8
  import { createComponentLog } from '../../ui/src/log'
9
- import VxeInputComponent from '../../input/src/input'
9
+ import VxeInputComponent from '../../input'
10
10
 
11
11
  import type { TableSelectReactData, VxeTableSelectPropTypes, TableSelectInternalData, VxeTableSelectEmits, VxeInputConstructor, VxeFormDefines, ValueOf, VxeComponentStyleType, VxeComponentSizeType, VxeModalConstructor, VxeModalMethods, VxeDrawerConstructor, VxeDrawerMethods, VxeFormConstructor, VxeFormPrivateMethods } from '../../../types'
12
12
  import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTablePropTypes } from '../../../types/components/table'
@@ -6,7 +6,7 @@ import { getSlotVNs } from '../../ui/src/vn'
6
6
  import { toCssUnit, addClass, removeClass } from '../../ui/src/dom'
7
7
  import { isEnableConf } from '../../ui/src/utils'
8
8
  import { createComponentLog } from '../../ui/src/log'
9
- import VxeLoadingComponent from '../../loading/src/loading'
9
+ import VxeLoadingComponent from '../../loading'
10
10
 
11
11
  import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, VxeComponentSizeType, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, 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, VxeUploadConstructor, VxeUploadPropTypes, UploadReactData, UploadInternalData, VxeUploadEmits, VxeComponentSizeType, VxeFormDefines, VxeFormConstructor, VxeFormPrivateMethods, ValueOf, VxeComponentEventParams } from '../../../types'
12
12
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
@@ -15,9 +15,14 @@
15
15
  padding: var(--vxe-ui-layout-padding-default);
16
16
  }
17
17
  }
18
+
18
19
  .vxe-layout-aside--inner {
19
20
  flex-grow: 1;
20
21
  overflow-y: auto;
21
22
  overflow-x: hidden;
22
23
  outline: 0;
24
+ }
25
+ .vxe-layout-aside--scrollbar {
26
+ flex-grow: 1;
27
+ overflow: hidden;
23
28
  }
@@ -11,5 +11,8 @@
11
11
  .vxe-layout-body--inner {
12
12
  flex-grow: 1;
13
13
  overflow: auto;
14
- outline: 0;
14
+ }
15
+ .vxe-layout-body--scrollbar {
16
+ flex-grow: 1;
17
+ overflow: hidden;
15
18
  }
@@ -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,18 @@
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--scrollbar-body {
126
+ flex-grow: 1;
127
+ overflow: hidden;
128
+ }
129
+ & > .vxe-menu--body {
130
+ flex-grow: 1;
131
+ overflow: auto;
132
+ }
120
133
  }
121
134
 
122
135
  .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;
@@ -37,20 +35,6 @@
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
- }
@@ -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,4 +1,5 @@
1
1
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType } from '@vxe-ui/core'
2
+ import { VxeScrollbarProps } from './scrollbar'
2
3
 
3
4
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
4
5
 
@@ -28,6 +29,8 @@ export namespace VxeLayoutAsidePropTypes {
28
29
  */
29
30
  animation?: boolean
30
31
  }
32
+ export type UseScrollbar = boolean
33
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'yConfig' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
31
34
  }
32
35
 
33
36
  export interface VxeLayoutAsideProps {
@@ -38,6 +41,8 @@ export interface VxeLayoutAsideProps {
38
41
  padding?: VxeLayoutAsidePropTypes.Padding
39
42
  size?: VxeLayoutAsidePropTypes.Size
40
43
  collapseConfig?: VxeLayoutAsidePropTypes.CollapseConfig
44
+ useScrollbar?: VxeLayoutAsidePropTypes.UseScrollbar
45
+ scrollbarConfig?: VxeLayoutAsidePropTypes.ScrollbarConfig
41
46
  }
42
47
 
43
48
  export interface LayoutAsidePrivateComputed {
@@ -1,5 +1,6 @@
1
1
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
2
2
  import { VxeBacktopProps, VxeBacktopSlotTypes } from './backtop'
3
+ import { VxeScrollbarProps } from './scrollbar'
3
4
 
4
5
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
5
6
 
@@ -23,14 +24,17 @@ export namespace VxeLayoutBodyPropTypes {
23
24
  export type Padding = boolean
24
25
  export type ShowBacktop = boolean
25
26
  export interface BacktopConfig extends Omit<VxeBacktopProps, 'target'> {}
27
+ export type UseScrollbar = boolean
28
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'xConfig' | 'yConfig' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
26
29
  }
27
-
28
30
  export interface VxeLayoutBodyProps {
29
31
  size?: VxeLayoutBodyPropTypes.Size
30
32
  loading?: VxeLayoutBodyPropTypes.Loading
31
33
  padding?: VxeLayoutBodyPropTypes.Padding
32
34
  showBacktop?: VxeLayoutBodyPropTypes.ShowBacktop
33
35
  backtopConfig?: VxeLayoutBodyPropTypes.BacktopConfig
36
+ useScrollbar?: VxeLayoutBodyPropTypes.UseScrollbar
37
+ scrollbarConfig?: VxeLayoutBodyPropTypes.ScrollbarConfig
34
38
  }
35
39
 
36
40
  export interface LayoutBodyPrivateComputed {
@@ -2,6 +2,7 @@ import { CreateElement } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType, VxeComponentPermissionCodeType, VxeComponentSlotType } 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 @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
7
8
 
@@ -79,6 +80,8 @@ export namespace VxeMenuPropTypes {
79
80
  }): boolean
80
81
  }
81
82
  export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
83
+ export type UseScrollbar = boolean
84
+ export interface ScrollbarConfig extends VxeScrollbarProps {}
82
85
  }
83
86
 
84
87
  export interface VxeMenuProps {
@@ -100,6 +103,8 @@ export interface VxeMenuProps {
100
103
  expandKeys?: VxeMenuPropTypes.ExpandKeys
101
104
  options?: VxeMenuPropTypes.Options
102
105
  menuConfig?: VxeMenuPropTypes.MenuConfig
106
+ useScrollbar?: VxeMenuPropTypes.UseScrollbar
107
+ scrollbarConfig?: VxeMenuPropTypes.ScrollbarConfig
103
108
  /**
104
109
  * 挂载到指定元素下
105
110
  */
@@ -17,6 +17,8 @@ export interface ScrollbarPrivateRef {
17
17
  export interface VxeScrollbarPrivateRef extends ScrollbarPrivateRef { }
18
18
 
19
19
  export namespace VxeScrollbarPropTypes {
20
+ export type Id = number | string
21
+ export type ViewId = number | string
20
22
  export type Width = number | string
21
23
  export type Height = number | string
22
24
  export type MinWidth = number | string
@@ -52,12 +54,18 @@ export namespace VxeScrollbarPropTypes {
52
54
  threshold?: string | number
53
55
  }
54
56
  export type ClassName = string
57
+ export type ViewAttrs = Record<string, any>
55
58
  export type ViewClassName = string
59
+ export type ViewInnerClassName = string
56
60
  export type AutoResize = boolean
57
61
  export type SyncResize = boolean
58
62
  }
59
63
 
60
64
  export interface VxeScrollbarProps {
65
+ /**
66
+ * ID
67
+ */
68
+ id?: VxeScrollbarPropTypes.Id
61
69
  /**
62
70
  * 容器宽度
63
71
  */
@@ -102,10 +110,18 @@ export interface VxeScrollbarProps {
102
110
  * 给容器附加 class
103
111
  */
104
112
  className?: VxeScrollbarPropTypes.ClassName
113
+ /**
114
+ * 给视图元素附加属性
115
+ */
116
+ viewAttrs?: VxeScrollbarPropTypes.ViewAttrs
105
117
  /**
106
118
  * 给视图元素附加 class
107
119
  */
108
120
  viewClassName?: VxeScrollbarPropTypes.ViewClassName
121
+ /**
122
+ * 给视图内元素附加 class
123
+ */
124
+ viewInnerClassName?: VxeScrollbarPropTypes.ViewInnerClassName
109
125
  /**
110
126
  * 自动监听元素的变化去重新计算样式
111
127
  */