vxe-pc-ui 4.8.23 → 4.8.25

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 (54) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/language/en-US.js +12 -12
  3. package/es/split/src/split.js +189 -53
  4. package/es/split/style.css +74 -9
  5. package/es/split/style.min.css +1 -1
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/ui/index.js +5 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/es/vxe-split/style.css +74 -9
  11. package/es/vxe-split/style.min.css +1 -1
  12. package/lib/icon/style/style.css +1 -1
  13. package/lib/icon/style/style.min.css +1 -1
  14. package/lib/index.umd.js +201 -84
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/language/en-US.js +12 -12
  17. package/lib/language/en-US.min.js +1 -1
  18. package/lib/language/en-US.umd.js +12 -12
  19. package/lib/split/src/split.js +195 -82
  20. package/lib/split/src/split.min.js +1 -1
  21. package/lib/split/style/style.css +74 -9
  22. package/lib/split/style/style.min.css +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/ui/index.js +5 -1
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/vxe-split/style/style.css +74 -9
  30. package/lib/vxe-split/style/style.min.css +1 -1
  31. package/package.json +1 -1
  32. package/packages/language/en-US.ts +12 -12
  33. package/packages/split/src/split.ts +196 -54
  34. package/packages/ui/index.ts +4 -0
  35. package/styles/components/split.scss +92 -16
  36. package/styles/theme/base.scss +2 -0
  37. package/styles/theme/dark.scss +1 -0
  38. package/styles/theme/light.scss +1 -0
  39. package/styles/variable.scss +1 -0
  40. package/types/components/gantt-module/gantt-view.d.ts +13 -13
  41. package/types/components/gantt.d.ts +66 -33
  42. package/types/components/split.d.ts +14 -0
  43. /package/es/icon/{iconfont.1755765610478.ttf → iconfont.1755949930275.ttf} +0 -0
  44. /package/es/icon/{iconfont.1755765610478.woff → iconfont.1755949930275.woff} +0 -0
  45. /package/es/icon/{iconfont.1755765610478.woff2 → iconfont.1755949930275.woff2} +0 -0
  46. /package/es/{iconfont.1755765610478.ttf → iconfont.1755949930275.ttf} +0 -0
  47. /package/es/{iconfont.1755765610478.woff → iconfont.1755949930275.woff} +0 -0
  48. /package/es/{iconfont.1755765610478.woff2 → iconfont.1755949930275.woff2} +0 -0
  49. /package/lib/icon/style/{iconfont.1755765610478.ttf → iconfont.1755949930275.ttf} +0 -0
  50. /package/lib/icon/style/{iconfont.1755765610478.woff → iconfont.1755949930275.woff} +0 -0
  51. /package/lib/icon/style/{iconfont.1755765610478.woff2 → iconfont.1755949930275.woff2} +0 -0
  52. /package/lib/{iconfont.1755765610478.ttf → iconfont.1755949930275.ttf} +0 -0
  53. /package/lib/{iconfont.1755765610478.woff → iconfont.1755949930275.woff} +0 -0
  54. /package/lib/{iconfont.1755765610478.woff2 → iconfont.1755949930275.woff2} +0 -0
@@ -2,6 +2,7 @@
2
2
  @use '../helpers/baseMixin.scss';
3
3
 
4
4
  .vxe-split {
5
+ position: relative;
5
6
  width: 100%;
6
7
  &.is--vertical {
7
8
  & > .vxe-split-wrapper {
@@ -32,6 +33,63 @@
32
33
  }
33
34
  }
34
35
  }
36
+
37
+ .vxe-split--resizable-split-tip {
38
+ display: none;
39
+ position: absolute;
40
+ top: 0;
41
+ left: 0;
42
+ z-index: 7;
43
+ pointer-events: none;
44
+ user-select: none;
45
+ cursor: col-resize;
46
+ &.is-resize--lazy {
47
+ &:before {
48
+ content: "";
49
+ display: block;
50
+ height: 100%;
51
+ background-color: var(--vxe-ui-split-resizable-drag-line-color);
52
+ }
53
+ }
54
+ &.is--horizontal {
55
+ width: 1px;
56
+ height: 100%;
57
+ .vxe-split--resizable-split-number-prev {
58
+ right: 0;
59
+ }
60
+ .vxe-split--resizable-split-number-next {
61
+ left: 1px;
62
+ }
63
+ }
64
+ &.is--vertical {
65
+ width: 100%;
66
+ height: 1px;
67
+ .vxe-split--resizable-split-number-prev {
68
+ bottom: 0;
69
+ }
70
+ .vxe-split--resizable-split-number-next {
71
+ top: 1px;
72
+ }
73
+ }
74
+ }
75
+ .vxe-split--resizable-split-tip-number {
76
+ position: absolute;
77
+ top: 0;
78
+ left: 0;
79
+ user-select: none;
80
+ pointer-events: none;
81
+ }
82
+ .vxe-split--resizable-split-number-prev,
83
+ .vxe-split--resizable-split-number-next {
84
+ position: absolute;
85
+ padding: 0.25em 0.25em;
86
+ font-size: 12px;
87
+ border-radius: var(--vxe-ui-border-radius);
88
+ white-space: nowrap;
89
+ color: #ffffff;
90
+ background-color: var(--vxe-ui-split-resizable-drag-line-color);
91
+ }
92
+
35
93
  .vxe-split-wrapper {
36
94
  height: 100%;
37
95
  display: flex;
@@ -65,6 +123,9 @@
65
123
  }
66
124
  .vxe-split-pane-handle-bar {
67
125
  background-color: var(--vxe-ui-split-handle-bar-background-color);
126
+ &:hover {
127
+ background-color: var(--vxe-ui-split-handle-bar-hover-background-color);
128
+ }
68
129
  }
69
130
  .vxe-split-pane-action-btn {
70
131
  position: absolute;
@@ -84,7 +145,8 @@
84
145
  cursor: pointer;
85
146
  @include baseMixin.createAnimationTransition(transform, 0.1s);
86
147
  &:hover {
87
- background-color: var(--vxe-ui-font-primary-lighten-color);
148
+ color: #ffffff;
149
+ background-color: var(--vxe-ui-font-primary-color);
88
150
  }
89
151
  &:active {
90
152
  transform: translate(-50%, -50%) scale(0.9);
@@ -117,28 +179,42 @@
117
179
  }
118
180
  &.is--resize {
119
181
  &.is--expand {
120
- &.is--horizontal {
121
- & > .vxe-split-pane-handle {
122
- .vxe-split-pane-handle-bar {
123
- cursor: w-resize;
182
+ &.is-resize--immediate {
183
+ &.is--horizontal {
184
+ & > .vxe-split-pane-handle {
185
+ .vxe-split-pane-handle-bar {
186
+ cursor: w-resize;
187
+ }
188
+ }
189
+ }
190
+ &.is--vertical {
191
+ & > .vxe-split-pane-handle {
192
+ .vxe-split-pane-handle-bar {
193
+ cursor: n-resize;
194
+ }
124
195
  }
125
196
  }
126
- }
127
- &.is--vertical {
128
197
  & > .vxe-split-pane-handle {
129
- .vxe-split-pane-handle-bar {
130
- cursor: n-resize;
198
+ & > .vxe-split-pane-handle-bar {
199
+ &:active {
200
+ background-color: var(--vxe-ui-font-primary-color);
201
+ }
131
202
  }
132
203
  }
133
204
  }
134
- & > .vxe-split-pane-handle {
135
- & > .vxe-split-pane-handle-bar {
136
- background-color: var(--vxe-ui-split-handle-bar-background-color);
137
- &:hover {
138
- background-color: var(--vxe-ui-font-primary-lighten-color);
205
+ &.is-resize--lazy {
206
+ &.is--horizontal {
207
+ & > .vxe-split-pane-handle {
208
+ .vxe-split-pane-handle-bar {
209
+ cursor: col-resize;
210
+ }
139
211
  }
140
- &:active {
141
- background-color: var(--vxe-ui-font-primary-darken-color);
212
+ }
213
+ &.is--vertical {
214
+ & > .vxe-split-pane-handle {
215
+ .vxe-split-pane-handle-bar {
216
+ cursor: row-resize;
217
+ }
142
218
  }
143
219
  }
144
220
  }
@@ -185,4 +185,6 @@
185
185
  --vxe-ui-split-handle-bar-horizontal-height: 6.8em;
186
186
  --vxe-ui-split-handle-bar-vertical-width: var(--vxe-ui-split-handle-bar-horizontal-height);
187
187
  --vxe-ui-split-handle-bar-vertical-height: var(--vxe-ui-split-handle-bar-horizontal-width);
188
+ --vxe-ui-split-resizable-line-color: #D9DDDF;
189
+ --vxe-ui-split-resizable-drag-line-color: var(--vxe-ui-font-primary-color);
188
190
  }
@@ -114,4 +114,5 @@
114
114
  /*split*/
115
115
  --vxe-ui-split-handle-button-background-color: #9f9f9f;
116
116
  --vxe-ui-split-handle-bar-background-color: #444444;
117
+ --vxe-ui-split-handle-bar-hover-background-color: #606060;
117
118
  }
@@ -113,4 +113,5 @@
113
113
  /*split*/
114
114
  --vxe-ui-split-handle-button-background-color: #{light_variable.$vxe-ui-split-handle-button-background-color};
115
115
  --vxe-ui-split-handle-bar-background-color: #{light_variable.$vxe-ui-split-handle-bar-background-color};
116
+ --vxe-ui-split-handle-bar-hover-background-color: #{light_variable.$vxe-ui-split-handle-bar-hover-background-color};
116
117
  }
@@ -106,4 +106,5 @@ $vxe-ui-rate-item-color: #f7ba2a !default;
106
106
  /*split*/
107
107
  $vxe-ui-split-handle-button-background-color: #8b8b8b;
108
108
  $vxe-ui-split-handle-bar-background-color: #e2e2e3;
109
+ $vxe-ui-split-handle-bar-hover-background-color: #d8d8d8;
109
110
 
@@ -33,6 +33,8 @@ export interface GanttViewReactData {
33
33
  // 横向滚动条的高度
34
34
  scrollbarHeight: number
35
35
 
36
+ // 最后滚动时间戳
37
+ lastScrollTime: number
36
38
  lazScrollLoading: boolean
37
39
 
38
40
  scrollVMLoading: boolean
@@ -47,13 +49,15 @@ export interface GanttViewReactData {
47
49
  maxViewDate: Date | null
48
50
  tableData: any[]
49
51
  tableColumn: VxeGanttDefines.ViewColumn[]
50
- headerGroups: VxeGanttDefines.HeaderColumn[]
52
+ headerGroups: VxeGanttDefines.GroupColumn[]
51
53
 
52
54
  viewCellWidth: number
53
55
  }
54
56
 
55
57
  export interface GanttViewInternalData {
56
58
  xeTable: (VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods) | null
59
+ // 渲染所有列
60
+ visibleColumn: VxeGanttDefines.ViewColumn[]
57
61
  startMaps: Record<string, any>
58
62
  endMaps: Record<string, any>
59
63
  chartMaps: Record<string, VxeGanttDefines.RowCacheItem>
@@ -70,17 +74,13 @@ export interface GanttViewInternalData {
70
74
  startIndex: number
71
75
  endIndex: number
72
76
  }
73
- // 存放纵向 Y 虚拟滚动相关信息
74
- scrollYStore: {
75
- adaptive?: boolean
76
- preloadSize: number
77
- offsetSize: number
78
- visibleSize: number
79
- visibleStartIndex: number
80
- visibleEndIndex: number
81
- startIndex: number
82
- endIndex: number
83
- }
77
+ // 最后滚动位置
78
+ lastScrollLeft: number
79
+ lastScrollTop: number
80
+
81
+ // 刷新布局
82
+ rceTimeout?: undefined | number
83
+ rceRunTime?: undefined | number
84
84
 
85
85
  // 滚动属性
86
86
  intoRunScroll?: boolean
@@ -138,7 +138,7 @@ export interface VxeGanttViewPrivateMethods {
138
138
  /**
139
139
  * @private
140
140
  */
141
- triggerFooterScrollEvent(evnt: Event): void
141
+ // triggerFooterScrollEvent(evnt: Event): void
142
142
  /**
143
143
  * @private
144
144
  */
@@ -101,7 +101,7 @@ export namespace VxeGanttPropTypes {
101
101
 
102
102
  export interface TaskViewConfig<D = any> {
103
103
  /**
104
- * 日期列头颗粒度配置
104
+ * 日期轴配置项
105
105
  */
106
106
  scales?: VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[]
107
107
  /**
@@ -149,6 +149,25 @@ export namespace VxeGanttPropTypes {
149
149
  showCollapseTaskButton?: boolean
150
150
  }
151
151
 
152
+ interface BarStyleConfig {
153
+ /**
154
+ * 圆角
155
+ */
156
+ round?: boolean
157
+ /**
158
+ * 任务条的背景颜色
159
+ */
160
+ bgColor?: string
161
+ /**
162
+ * 任务条的字体颜色
163
+ */
164
+ fontColor?: string
165
+ /**
166
+ * 已完成部分任务条的背景颜色
167
+ */
168
+ completedBgColor?: string
169
+ }
170
+
152
171
  export interface TaskBarConfig<D = any> {
153
172
  /**
154
173
  * 是否显示进度条
@@ -169,24 +188,10 @@ export namespace VxeGanttPropTypes {
169
188
  /**
170
189
  * 任务条样式
171
190
  */
172
- barStyle?: {
173
- /**
174
- * 圆角
175
- */
176
- round?: boolean
177
- /**
178
- * 任务条的背景颜色
179
- */
180
- bgColor?: string
181
- /**
182
- * 任务条的字体颜色
183
- */
184
- fontColor?: string
185
- /**
186
- * 已完成部分任务条的背景颜色
187
- */
188
- completedBgColor?: string
189
- }
191
+ barStyle?: BarStyleConfig | ((params: {
192
+ $gantt: VxeGanttConstructor<D>
193
+ row: D
194
+ }) => BarStyleConfig)
190
195
  }
191
196
  }
192
197
 
@@ -194,16 +199,16 @@ export interface VxeGanttProps<D = any> extends Omit<VxeGridProps<D>, 'layouts'>
194
199
  layouts?: VxeGanttPropTypes.Layouts
195
200
  taskConfig?: VxeGanttPropTypes.TaskConfig
196
201
  taskViewScaleConfs?: VxeGanttPropTypes.TaskViewScaleConfs
197
- taskViewConfig?: VxeGanttPropTypes.TaskViewConfig
202
+ taskViewConfig?: VxeGanttPropTypes.TaskViewConfig<D>
198
203
  taskSplitConfig?: VxeGanttPropTypes.TaskSplitConfig
199
- taskBarConfig?: VxeGanttPropTypes.TaskBarConfig
204
+ taskBarConfig?: VxeGanttPropTypes.TaskBarConfig<D>
200
205
  }
201
206
 
202
207
  export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
203
208
  computeTaskOpts: ComputedRef<VxeGanttPropTypes.TaskConfig>
204
- computeTaskViewOpts: ComputedRef<VxeGanttPropTypes.TaskViewConfig>
209
+ computeTaskViewOpts: ComputedRef<VxeGanttPropTypes.TaskViewConfig<D>>
205
210
  computeTaskViewScaleMapsOpts: ComputedRef<VxeGanttPropTypes.TaskViewScaleConfs>
206
- computeTaskBarOpts: ComputedRef<VxeGanttPropTypes.TaskBarConfig>
211
+ computeTaskBarOpts: ComputedRef<VxeGanttPropTypes.TaskBarConfig<D>>
207
212
  computeTaskSplitOpts: ComputedRef<VxeGanttPropTypes.TaskSplitConfig>
208
213
  computeTaskScaleConfs: ComputedRef<VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined>
209
214
  computeTitleField: ComputedRef<string>
@@ -276,7 +281,9 @@ export type VxeGanttEmits = [
276
281
  'task-cell-click',
277
282
  'task-cell-dblclick',
278
283
  'task-bar-click',
279
- 'task-bar-dblclick'
284
+ 'task-bar-dblclick',
285
+ 'task-view-cell-click',
286
+ 'task-view-cell-dblclick'
280
287
  ]
281
288
 
282
289
  export namespace VxeGanttDefines {
@@ -286,12 +293,15 @@ export namespace VxeGanttDefines {
286
293
 
287
294
  export type LayoutKey = 'Form' | 'Toolbar' | 'Top' | 'Gantt' | 'Bottom' | 'Pager'
288
295
 
289
- export interface HeaderColumn<D = any> {
296
+ export interface GroupColumn<D = any> {
290
297
  scaleItem: ColumnScaleObj
291
298
  columns: ViewColumn<D>[]
292
299
  }
293
300
 
294
- export interface ViewColumn<D = any> extends VxeGanttPropTypes.Column<D> {
301
+ export interface ViewColumn<D = any> {
302
+ field: string
303
+ title: string
304
+ dateObj: VxeGanttDefines.ScaleDateObj
295
305
  childCount?: number
296
306
  children?: ViewColumn<D>[]
297
307
  }
@@ -313,12 +323,16 @@ export namespace VxeGanttDefines {
313
323
  /**
314
324
  * 标题
315
325
  */
316
- titleMethod?: (params: {
317
- title: string | number
318
- dateObj: VxeGanttDefines.ScaleDateObj
319
- scaleObj: VxeGanttDefines.ColumnScaleObj
320
- $rowIndex: number
321
- }) => string | number
326
+ titleMethod?: (params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => string | number
327
+ /**
328
+ * 自定义插槽模板
329
+ */
330
+ slots?: {
331
+ /**
332
+ * 自定义标题
333
+ */
334
+ title?: string | ((params: VxeGanttSlotTypes.TaskViewCellTitleSlotParams) => VxeComponentSlotType | VxeComponentSlotType[])
335
+ }
322
336
  }
323
337
 
324
338
  export interface ScaleWeekOptions extends ScaleDefaultOptions {
@@ -333,7 +347,7 @@ export namespace VxeGanttDefines {
333
347
  */
334
348
  export type ColumnScaleType = 'second' | 'minute' | 'hour' | 'date' | 'day' | 'week' | 'month' | 'quarter' | 'year'
335
349
 
336
- export interface ColumnScaleConfig {
350
+ export interface ColumnScaleConfig extends ScaleDefaultOptions, ScaleWeekOptions {
337
351
  type: ColumnScaleType
338
352
  align?: VxeComponentAlignType
339
353
  }
@@ -362,6 +376,12 @@ export namespace VxeGanttDefines {
362
376
  export interface TaskCellDblClickEventParams<D = any> extends TaskCellClickEventParams<D> {}
363
377
  export interface TaskBarClickEventParams<D = any> extends TaskBarClickParams<D>, GanttEventParams {}
364
378
  export interface TaskBarDblClickEventParams<D = any> extends TaskBarClickEventParams<D> {}
379
+
380
+ export interface TaskViewCellClickEventParams<D = any> extends GanttEventParams {
381
+ row: D
382
+ column: ViewColumn<D>
383
+ }
384
+ export interface TaskViewCellDblClickEventParams<D = any> extends TaskViewCellClickEventParams<D> {}
365
385
  }
366
386
 
367
387
  export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
@@ -369,6 +389,8 @@ export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
369
389
  onTaskCellDblClick?: VxeGanttEvents.TaskCellDblClick<D>
370
390
  onTaskBarClick?: VxeGanttEvents.TaskBarClick<D>
371
391
  onTaskBarDblClick?: VxeGanttEvents.TaskBarDblClick<D>
392
+ onTaskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
393
+ onTaskViewCellDblClick?: VxeGanttEvents.TaskViewCellDblClick<D>
372
394
  }
373
395
 
374
396
  export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
@@ -376,6 +398,8 @@ export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
376
398
  taskCellDblClick?: VxeGanttEvents.TaskCellDblClick<D>
377
399
  taskBarClick?: VxeGanttEvents.TaskBarClick<D>
378
400
  taskBarDblClick?: VxeGanttEvents.TaskBarDblClick<D>
401
+ taskViewCellClick?: VxeGanttEvents.TaskViewCellClick<D>
402
+ taskViewCellDblClick?: VxeGanttEvents.TaskViewCellDblClick<D>
379
403
  }
380
404
 
381
405
  export namespace VxeGanttEvents {
@@ -383,6 +407,8 @@ export namespace VxeGanttEvents {
383
407
  export type TaskCellDblClick<D = any> = (params: VxeGanttDefines.TaskCellDblClickEventParams<D>) => void
384
408
  export type TaskBarClick<D = any> = (params: VxeGanttDefines.TaskBarClickEventParams<D>) => void
385
409
  export type TaskBarDblClick<D = any> = (params: VxeGanttDefines.TaskBarDblClickEventParams<D>) => void
410
+ export type TaskViewCellClick<D = any> = (params: VxeGanttDefines.TaskViewCellClickEventParams<D>) => void
411
+ export type TaskViewCellDblClick<D = any> = (params: VxeGanttDefines.TaskViewCellDblClickEventParams<D>) => void
386
412
  }
387
413
 
388
414
  export namespace VxeGanttSlotTypes {
@@ -393,6 +419,13 @@ export namespace VxeGanttSlotTypes {
393
419
  export interface TaskBarSlotParams<D = any> {
394
420
  row: D
395
421
  }
422
+
423
+ export interface TaskViewCellTitleSlotParams {
424
+ title: string | number
425
+ dateObj: VxeGanttDefines.ScaleDateObj
426
+ scaleObj: VxeGanttDefines.ColumnScaleObj
427
+ $rowIndex: number
428
+ }
396
429
  }
397
430
 
398
431
  export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
@@ -39,6 +39,16 @@ export namespace VxeSplitPropTypes {
39
39
  width?: string | number
40
40
  height?: string | number
41
41
  }
42
+ export interface ResizeConfig {
43
+ /**
44
+ * 是否实时同步渲染
45
+ */
46
+ immediate?: boolean
47
+ /**
48
+ * 是否显示拖拽提示
49
+ */
50
+ showTip?: boolean
51
+ }
42
52
  export interface ActionConfig {
43
53
  /**
44
54
  * 是否启用
@@ -101,6 +111,10 @@ export type VxeSplitProps = {
101
111
  * 拖动条配置项
102
112
  */
103
113
  barConfig?: VxeSplitPropTypes.BarConfig
114
+ /**
115
+ * 拖拽配置项
116
+ */
117
+ resizeConfig?: VxeSplitPropTypes.ResizeConfig
104
118
  /**
105
119
  * 折叠按钮配置项
106
120
  */