vxe-pc-ui 4.18.21 → 4.18.23

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 (84) hide show
  1. package/dist/all.esm.js +1638 -1048
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/components.js +3 -0
  5. package/es/icon/style.css +1 -1
  6. package/es/result/src/result.js +1 -1
  7. package/es/scrollbar/index.js +12 -0
  8. package/es/scrollbar/src/scrollbar.js +520 -0
  9. package/es/scrollbar/src/util.js +54 -0
  10. package/es/scrollbar/style.css +101 -0
  11. package/es/scrollbar/style.min.css +1 -0
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/ui/index.js +10 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/upload/style.css +5 -3
  17. package/es/upload/style.min.css +1 -1
  18. package/es/vxe-scrollbar/index.js +3 -0
  19. package/es/vxe-scrollbar/style.css +101 -0
  20. package/es/vxe-scrollbar/style.min.css +1 -0
  21. package/es/vxe-upload/style.css +5 -3
  22. package/es/vxe-upload/style.min.css +1 -1
  23. package/lib/components.js +13 -1
  24. package/lib/components.min.js +1 -1
  25. package/lib/icon/style/style.css +1 -1
  26. package/lib/icon/style/style.min.css +1 -1
  27. package/lib/index.umd.js +697 -6
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/result/src/result.js +1 -1
  30. package/lib/result/src/result.min.js +1 -1
  31. package/lib/scrollbar/index.js +19 -0
  32. package/lib/scrollbar/index.min.js +1 -0
  33. package/lib/scrollbar/src/scrollbar.js +560 -0
  34. package/lib/scrollbar/src/scrollbar.min.js +1 -0
  35. package/lib/scrollbar/src/util.js +63 -0
  36. package/lib/scrollbar/src/util.min.js +1 -0
  37. package/lib/scrollbar/style/index.js +1 -0
  38. package/lib/scrollbar/style/style.css +101 -0
  39. package/lib/scrollbar/style/style.min.css +1 -0
  40. package/lib/style.css +1 -1
  41. package/lib/style.min.css +1 -1
  42. package/lib/ui/index.js +10 -1
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/upload/style/style.css +5 -3
  47. package/lib/upload/style/style.min.css +1 -1
  48. package/lib/vxe-scrollbar/index.js +21 -0
  49. package/lib/vxe-scrollbar/index.min.js +1 -0
  50. package/lib/vxe-scrollbar/style/index.js +1 -0
  51. package/lib/vxe-scrollbar/style/style.css +101 -0
  52. package/lib/vxe-scrollbar/style/style.min.css +1 -0
  53. package/lib/vxe-upload/style/style.css +5 -3
  54. package/lib/vxe-upload/style/style.min.css +1 -1
  55. package/package.json +2 -2
  56. package/packages/components.ts +3 -0
  57. package/packages/result/src/result.ts +1 -1
  58. package/packages/scrollbar/index.ts +16 -0
  59. package/packages/scrollbar/src/scrollbar.ts +564 -0
  60. package/packages/scrollbar/src/util.ts +57 -0
  61. package/packages/ui/index.ts +9 -0
  62. package/styles/all.scss +1 -0
  63. package/styles/components/scrollbar.scss +114 -0
  64. package/styles/components/upload.scss +5 -3
  65. package/styles/theme/base.scss +5 -0
  66. package/styles/theme/dark.scss +5 -0
  67. package/styles/theme/light.scss +5 -0
  68. package/styles/variable.scss +5 -0
  69. package/types/all.d.ts +3 -0
  70. package/types/components/gantt.d.ts +3 -3
  71. package/types/components/scrollbar.d.ts +216 -0
  72. package/types/ui/global-config.d.ts +2 -0
  73. /package/es/icon/{iconfont.1790757619500.ttf → iconfont.1791517860186.ttf} +0 -0
  74. /package/es/icon/{iconfont.1790757619500.woff → iconfont.1791517860186.woff} +0 -0
  75. /package/es/icon/{iconfont.1790757619500.woff2 → iconfont.1791517860186.woff2} +0 -0
  76. /package/es/{iconfont.1790757619500.ttf → iconfont.1791517860186.ttf} +0 -0
  77. /package/es/{iconfont.1790757619500.woff → iconfont.1791517860186.woff} +0 -0
  78. /package/es/{iconfont.1790757619500.woff2 → iconfont.1791517860186.woff2} +0 -0
  79. /package/lib/icon/style/{iconfont.1790757619500.ttf → iconfont.1791517860186.ttf} +0 -0
  80. /package/lib/icon/style/{iconfont.1790757619500.woff → iconfont.1791517860186.woff} +0 -0
  81. /package/lib/icon/style/{iconfont.1790757619500.woff2 → iconfont.1791517860186.woff2} +0 -0
  82. /package/lib/{iconfont.1790757619500.ttf → iconfont.1791517860186.ttf} +0 -0
  83. /package/lib/{iconfont.1790757619500.woff → iconfont.1791517860186.woff} +0 -0
  84. /package/lib/{iconfont.1790757619500.woff2 → iconfont.1791517860186.woff2} +0 -0
@@ -0,0 +1,114 @@
1
+ @use '../helpers/baseMixin.scss';
2
+
3
+ .vxe-scrollbar {
4
+ width: 100%;
5
+ position: relative;
6
+ &.is--virtual {
7
+ & > .vxe-scrollbar--view {
8
+ scrollbar-width: none;
9
+ -ms-overflow-style: none;
10
+ overflow-x: auto;
11
+ overflow-y: auto;
12
+ }
13
+ & > .vxe-scrollbar--view::-webkit-scrollbar {
14
+ display: none;
15
+ }
16
+ &.ov-x--auto-hide {
17
+ &:hover {
18
+ & > .vxe-scrollbar--track-x {
19
+ opacity: 1;
20
+ }
21
+ }
22
+ & > .vxe-scrollbar--track-x {
23
+ opacity: 0;
24
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
25
+ }
26
+ }
27
+ &.ov-y--auto-hide {
28
+ &:hover {
29
+ & > .vxe-scrollbar--track-y {
30
+ opacity: 1;
31
+ }
32
+ }
33
+ & > .vxe-scrollbar--track-y {
34
+ opacity: 0;
35
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
36
+ }
37
+ }
38
+ }
39
+ &.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
+ & > .vxe-scrollbar--view::-webkit-scrollbar {
55
+ width: var(--vxe-ui-scrollbar-y-width);
56
+ height: var(--vxe-ui-scrollbar-x-height);
57
+ }
58
+ & > .vxe-scrollbar--view::-webkit-scrollbar-thumb {
59
+ border-radius: var(--vxe-ui-base-border-radius);
60
+ background-color: var(--vxe-ui-scrollbar-thumb-background-color);
61
+ }
62
+ & > .vxe-scrollbar--view::-webkit-scrollbar-thumb:hover {
63
+ background-color: var(--vxe-ui-scrollbar-thumb-hover-background-color);
64
+ }
65
+ & > .vxe-scrollbar--view::-webkit-scrollbar-thumb:active {
66
+ background-color: var(--vxe-ui-scrollbar-thumb-active-background-color);
67
+ }
68
+ }
69
+ }
70
+
71
+ .vxe-scrollbar--view {
72
+ height: 100%;
73
+ width: 100%;
74
+ }
75
+
76
+ .vxe-scrollbar--track-x,
77
+ .vxe-scrollbar--track-y {
78
+ position: absolute;
79
+ background-color: var(--vxe-ui-scrollbar-track-background-color);
80
+ user-select: none;
81
+ }
82
+
83
+ .vxe-scrollbar--track-x {
84
+ width: 100%;
85
+ bottom: 0;
86
+ left: 0;
87
+ height: var(--vxe-ui-scrollbar-x-height);
88
+ }
89
+
90
+ .vxe-scrollbar--track-y {
91
+ height: 100%;
92
+ right: 0;
93
+ top: 0;
94
+ width: var(--vxe-ui-scrollbar-y-width);
95
+ }
96
+
97
+ .vxe-scrollbar--thumb-y {
98
+ width: 100%;
99
+ }
100
+ .vxe-scrollbar--thumb-x {
101
+ height: 100%;
102
+ }
103
+
104
+ .vxe-scrollbar--thumb-x,
105
+ .vxe-scrollbar--thumb-y {
106
+ border-radius: var(--vxe-ui-base-border-radius);
107
+ background-color: var(--vxe-ui-scrollbar-thumb-background-color);
108
+ &:hover {
109
+ background-color: var(--vxe-ui-scrollbar-thumb-hover-background-color);
110
+ }
111
+ &:active {
112
+ background-color: var(--vxe-ui-scrollbar-thumb-active-background-color);
113
+ }
114
+ }
@@ -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 {
@@ -318,4 +318,9 @@
318
318
  --vxe-ui-divider-vertical-margin-small: 8px;
319
319
  --vxe-ui-divider-vertical-margin-mini: 6px;
320
320
  --vxe-ui-divider-border-width: 1px;
321
+
322
+ /*scrollbar*/
323
+ --vxe-ui-scrollbar-y-width: 10px;
324
+ --vxe-ui-scrollbar-x-height: var(--vxe-ui-scrollbar-y-width);
325
+ --vxe-ui-scrollbar-track-background-color: transparent;
321
326
  }
@@ -147,4 +147,9 @@
147
147
  /*image-preview*/
148
148
  --vxe-ui-vxe-image-preview-operation-color: rgba(0,0,0,0.7);
149
149
  --vxe-ui-vxe-image-preview-operation-background-color: rgba(255,255,255,0.4);
150
+
151
+ /*scrollbar*/
152
+ --vxe-ui-scrollbar-thumb-background-color: #8b8b8b;
153
+ --vxe-ui-scrollbar-thumb-hover-background-color: #d1d1d1;
154
+ --vxe-ui-scrollbar-thumb-active-background-color: #e0e0e0;
150
155
  }
@@ -146,4 +146,9 @@
146
146
  /*image-preview*/
147
147
  --vxe-ui-vxe-image-preview-operation-color: #{light_variable.$vxe-ui-vxe-image-preview-operation-color};
148
148
  --vxe-ui-vxe-image-preview-operation-background-color: #{light_variable.$vxe-ui-vxe-image-preview-operation-background-color};
149
+
150
+ /*scrollbar*/
151
+ --vxe-ui-scrollbar-thumb-background-color: #{light_variable.$vxe-ui-scrollbar-thumb-background-color};
152
+ --vxe-ui-scrollbar-thumb-hover-background-color: #{light_variable.$vxe-ui-scrollbar-thumb-hover-background-color};
153
+ --vxe-ui-scrollbar-thumb-active-background-color: #{light_variable.$vxe-ui-scrollbar-thumb-active-background-color};
149
154
  }
@@ -141,3 +141,8 @@ $vxe-ui-list-drag-over-background-color: rgba(255,255,200,0.3) !default;
141
141
  /*image-preview*/
142
142
  $vxe-ui-vxe-image-preview-operation-color: rgba(255,255,255,0.6) !default;
143
143
  $vxe-ui-vxe-image-preview-operation-background-color: rgba(0, 0, 0, 0.7) !default;
144
+
145
+ /*scrollbar*/
146
+ $vxe-ui-scrollbar-thumb-background-color: #8b8b8b !default;
147
+ $vxe-ui-scrollbar-thumb-hover-background-color: #636363 !default;
148
+ $vxe-ui-scrollbar-thumb-active-background-color: #555555 !default;
package/types/all.d.ts CHANGED
@@ -66,6 +66,7 @@ import VxeRadioButton from './components/radio-button'
66
66
  import VxeRadioGroup from './components/radio-group'
67
67
  import VxeResult from './components/result'
68
68
  import VxeRow from './components/row'
69
+ import VxeScrollbar from './components/scrollbar'
69
70
  import VxeSegmented from './components/segmented'
70
71
  import VxeSelect from './components/select'
71
72
  import VxeSplitter from './components/splitter'
@@ -343,6 +344,7 @@ interface UIComponents {
343
344
  VxeRate: typeof VxeRate
344
345
  VxeResult: typeof VxeResult
345
346
  VxeRow: typeof VxeRow
347
+ VxeScrollbar: typeof VxeScrollbar
346
348
  VxeSegmented: typeof VxeSegmented
347
349
  VxeSelect: typeof VxeSelect
348
350
  VxeSplitter: typeof VxeSplitter
@@ -519,6 +521,7 @@ export * from './components/radio-group'
519
521
  export * from './components/rate'
520
522
  export * from './components/result'
521
523
  export * from './components/row'
524
+ export * from './components/scrollbar'
522
525
  export * from './components/segmented'
523
526
  export * from './components/select'
524
527
  export * from './components/splitter'
@@ -36,15 +36,15 @@ export namespace VxeGanttPropTypes {
36
36
  export type Columns<D = any> = Column<D>[]
37
37
  export interface Link<D = any> extends VxeGanttDefines.LinkStyleConfig {
38
38
  /**
39
- * 线类型
39
+ * 线类型 (0 = FinishToStart), (1 = StartToFinish), (2 = StartToStart), (3 = FinishToFinish)
40
40
  */
41
41
  type: VxeGanttDependencyType
42
42
  /**
43
- * 从指定行
43
+ * 从指定行开始线连接
44
44
  */
45
45
  from: D | string | number
46
46
  /**
47
- * 到目标行
47
+ * 到目标行结束线连接
48
48
  */
49
49
  to: D | string | number
50
50
  }
@@ -0,0 +1,216 @@
1
+ import { RenderFunction, SetupContext, Ref } from 'vue'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf } from '@vxe-ui/core'
3
+
4
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
+
6
+ export declare const VxeScrollbar: DefineVxeComponentApp<VxeScrollbarProps, VxeScrollbarEventProps, VxeScrollbarSlots, VxeScrollbarMethods>
7
+ export type VxeScrollbarComponent = DefineVxeComponentOptions<VxeScrollbarProps, VxeScrollbarEventProps>
8
+
9
+ export type VxeScrollbarInstance = DefineVxeComponentInstance<VxeScrollbarProps, VxeScrollbarConstructor>
10
+
11
+ export interface VxeScrollbarConstructor extends VxeComponentBaseOptions, VxeScrollbarMethods {
12
+ props: VxeScrollbarProps
13
+ context: SetupContext<VxeScrollbarEmits>
14
+ reactData: ScrollbarReactData
15
+ internalData: ScrollbarInternalData
16
+ getRefMaps(): ScrollbarPrivateRef
17
+ getComputeMaps(): ScrollbarPrivateComputed
18
+ renderVN: RenderFunction
19
+ }
20
+
21
+ export interface ScrollbarPrivateRef {
22
+ refElem: Ref<HTMLDivElement | undefined>
23
+ }
24
+ export interface VxeScrollbarPrivateRef extends ScrollbarPrivateRef { }
25
+
26
+ export namespace VxeScrollbarPropTypes {
27
+ export type Width = number | string
28
+ export type Height = number | string
29
+ export type MinWidth = number | string
30
+ export type MinHeight = number | string
31
+ export type MaxWidth = number | string
32
+ export type MaxHeight = number | string
33
+ export type Loading = boolean
34
+ export type Native = boolean
35
+ export interface XConfig {
36
+ height?: number | string
37
+ // showArrows?: boolean
38
+ /**
39
+ * 是否自动隐藏滚动条
40
+ */
41
+ autoHide?: boolean
42
+ visible?: 'auto' | 'hidden' | 'visible' | ''
43
+ /**
44
+ * 滚动到边界触发的阈值会触发 scroll-boundary 事件
45
+ */
46
+ threshold?: string | number
47
+ }
48
+ export interface YConfig {
49
+ width?: number | string
50
+ // showArrows?: boolean
51
+ /**
52
+ * 是否自动隐藏滚动条
53
+ */
54
+ autoHide?: boolean
55
+ visible?: 'auto' | 'hidden' | 'visible' | ''
56
+ /**
57
+ * 滚动到边界触发的阈值会触发 scroll-boundary 事件
58
+ */
59
+ threshold?: string | number
60
+ }
61
+ export type ClassName = string
62
+ export type ViewClassName = string
63
+ export type AutoResize = boolean
64
+ export type SyncResize = boolean
65
+ }
66
+
67
+ export interface VxeScrollbarProps {
68
+ /**
69
+ * 容器宽度
70
+ */
71
+ width?: VxeScrollbarPropTypes.Width
72
+ /**
73
+ * 容器最小高度
74
+ */
75
+ height?: VxeScrollbarPropTypes.Height
76
+ /**
77
+ * 容器最小宽度
78
+ */
79
+ minWidth?: VxeScrollbarPropTypes.MinWidth
80
+ /**
81
+ * 容器最大高度
82
+ */
83
+ minHeight?: VxeScrollbarPropTypes.MinHeight
84
+ /**
85
+ * 容器最大宽度
86
+ */
87
+ maxWidth?: VxeScrollbarPropTypes.MaxWidth
88
+ /**
89
+ * 容器高度
90
+ */
91
+ maxHeight?: VxeScrollbarPropTypes.MaxHeight
92
+ /**
93
+ * 是否加载中
94
+ */
95
+ loading?: VxeScrollbarPropTypes.Loading
96
+ /**
97
+ * 是否使用原生滚动条
98
+ */
99
+ native?: VxeScrollbarPropTypes.Native
100
+ /**
101
+ * 纵向滚动条宽度
102
+ */
103
+ xConfig?: VxeScrollbarPropTypes.XConfig
104
+ /**
105
+ * 横向滚动条高度
106
+ */
107
+ yConfig?: VxeScrollbarPropTypes.YConfig
108
+ /**
109
+ * 给容器附加 class
110
+ */
111
+ className?: VxeScrollbarPropTypes.ClassName
112
+ /**
113
+ * 给视图元素附加 class
114
+ */
115
+ viewClassName?: VxeScrollbarPropTypes.ViewClassName
116
+ /**
117
+ * 自动监听元素的变化去重新计算样式
118
+ */
119
+ autoResize?: VxeScrollbarPropTypes.AutoResize
120
+ /**
121
+ * 自动跟随某个属性的变化去重新计算表格,和手动调用 recalculate 方法是一样的效果(对于通过某个属性来更新内容时可能会用到)
122
+ */
123
+ syncResize?: VxeScrollbarPropTypes.SyncResize
124
+ }
125
+
126
+ export interface ScrollbarPrivateComputed {
127
+ }
128
+ export interface VxeScrollbarPrivateComputed extends ScrollbarPrivateComputed { }
129
+
130
+ export interface ScrollbarReactData {
131
+ yThumbHeight: number
132
+ xThumbWidth: number
133
+ }
134
+ export interface ScrollbarInternalData {
135
+ resizeObserver?: ResizeObserver
136
+ isThumbDrag?: boolean
137
+ thumbDragOffset: number
138
+ yThumbTop: number
139
+ xThumbLeft: number
140
+ lastScrollTop: number
141
+ lastScrollLeft: number
142
+ }
143
+
144
+ export interface ScrollbarMethods {
145
+ dispatchEvent(type: ValueOf<VxeScrollbarEmits>, params: Record<string, any>, evnt: Event | null): void
146
+ /**
147
+ * 滚动到指定位置
148
+ */
149
+ scrollTo(options: ScrollToOptions): void
150
+ scrollTo(left: number, top: number): void
151
+ /**
152
+ * 滚动元素到可见位置
153
+ */
154
+ scrollIntoView(): void
155
+ /**
156
+ * 重新计算样式
157
+ * 对于某些特殊场景可能会用到,比如更新内容
158
+ */
159
+ recalculate(): Promise<void>
160
+ }
161
+ export interface VxeScrollbarMethods extends ScrollbarMethods { }
162
+
163
+ export interface ScrollbarPrivateMethods { }
164
+ export interface VxeScrollbarPrivateMethods extends ScrollbarPrivateMethods { }
165
+
166
+ export type VxeScrollbarEmits = [
167
+ 'scroll',
168
+ 'scroll-boundary'
169
+ ]
170
+
171
+ export namespace VxeScrollbarDefines {
172
+ export interface ScrollbarEventParams extends VxeComponentEventParams {
173
+ $scrollbar: VxeScrollbarConstructor
174
+ }
175
+
176
+ export interface ScrollEventParams extends ScrollbarEventParams {
177
+ direction: 'top' | 'bottom' | 'left' | 'right'
178
+ isTop: boolean
179
+ isBottom: boolean
180
+ isLeft: boolean
181
+ isRight: boolean
182
+ scrollTop: number
183
+ scrollLeft: number
184
+ clientWidth: number
185
+ clientHeight: number
186
+ scrollHeight: number
187
+ scrollWidth: number
188
+ }
189
+ export interface ScrollBoundaryEventParams extends ScrollEventParams {}
190
+ }
191
+
192
+ export type VxeScrollbarEventProps = {
193
+ onScroll?: VxeScrollbarEvents.Scroll
194
+ onScrolllBoundary?: VxeScrollbarEvents.ScrollBoundary
195
+ }
196
+
197
+ export interface VxeScrollbarListeners {
198
+ scroll?: VxeScrollbarEvents.Scroll
199
+ scrolllBoundary?: VxeScrollbarEvents.ScrollBoundary
200
+ }
201
+
202
+ export namespace VxeScrollbarEvents {
203
+ export type Scroll = (params: VxeScrollbarDefines.ScrollEventParams) => void
204
+ export type ScrollBoundary = (params: VxeScrollbarDefines.ScrollBoundaryEventParams) => void
205
+ }
206
+
207
+ export namespace VxeScrollbarSlotTypes {
208
+ export interface DefaultSlotParams {}
209
+ }
210
+
211
+ export interface VxeScrollbarSlots {
212
+ default?: (params: VxeScrollbarSlotTypes.DefaultSlotParams) => any
213
+ }
214
+
215
+ export const Scrollbar: typeof VxeScrollbar
216
+ export default VxeScrollbar
@@ -65,6 +65,7 @@ import { VxeRadioGroupProps } from '../components/radio-group'
65
65
  import { VxeRateProps } from '../components/rate'
66
66
  import { VxeResultProps } from '../components/result'
67
67
  import { VxeRowProps } from '../components/row'
68
+ import { VxeScrollbarProps } from '../components/scrollbar'
68
69
  import { VxeSegmentedProps } from '../components/segmented'
69
70
  import { VxeSelectProps } from '../components/select'
70
71
  import { VxeSplitterProps } from '../components/splitter'
@@ -180,6 +181,7 @@ declare module '@vxe-ui/core' {
180
181
  rate?: VxeRateProps
181
182
  result?: VxeResultProps
182
183
  row?: VxeRowProps
184
+ scrollbar?: VxeScrollbarProps
183
185
  segmented?: VxeSegmentedProps
184
186
  select?: VxeSelectProps
185
187
  splitter?: VxeSplitterProps