vxe-pc-ui 4.20.0 → 4.20.2

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 (128) hide show
  1. package/dist/all.esm.js +780 -173
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/card/src/card.js +19 -4
  5. package/es/drawer/src/drawer.js +59 -15
  6. package/es/drawer/style.css +13 -6
  7. package/es/drawer/style.min.css +1 -1
  8. package/es/icon/style.css +1 -1
  9. package/es/language/fr-FR.js +29 -29
  10. package/es/layout-aside/src/layout-aside.js +10 -6
  11. package/es/layout-body/src/layout-body.js +21 -12
  12. package/es/list/src/list.js +118 -49
  13. package/es/list/style.css +25 -8
  14. package/es/list/style.min.css +1 -1
  15. package/es/menu/src/menu.js +2 -2
  16. package/es/modal/src/modal.js +56 -12
  17. package/es/modal/style.css +15 -4
  18. package/es/modal/style.min.css +1 -1
  19. package/es/scrollbar/src/scrollbar.js +73 -19
  20. package/es/style.css +1 -1
  21. package/es/style.min.css +1 -1
  22. package/es/tabs/src/tabs.js +21 -6
  23. package/es/tree/src/tree.js +410 -53
  24. package/es/tree/style.css +43 -0
  25. package/es/tree/style.min.css +1 -1
  26. package/es/ui/index.js +1 -1
  27. package/es/ui/src/log.js +1 -1
  28. package/es/ui/src/utils.js +3 -0
  29. package/es/vxe-drawer/style.css +13 -6
  30. package/es/vxe-drawer/style.min.css +1 -1
  31. package/es/vxe-list/style.css +25 -8
  32. package/es/vxe-list/style.min.css +1 -1
  33. package/es/vxe-modal/style.css +15 -4
  34. package/es/vxe-modal/style.min.css +1 -1
  35. package/es/vxe-tree/style.css +43 -0
  36. package/es/vxe-tree/style.min.css +1 -1
  37. package/lib/card/src/card.js +19 -4
  38. package/lib/card/src/card.min.js +1 -1
  39. package/lib/drawer/src/drawer.js +64 -11
  40. package/lib/drawer/src/drawer.min.js +1 -1
  41. package/lib/drawer/style/style.css +13 -6
  42. package/lib/drawer/style/style.min.css +1 -1
  43. package/lib/icon/style/style.css +1 -1
  44. package/lib/icon/style/style.min.css +1 -1
  45. package/lib/index.umd.js +887 -183
  46. package/lib/index.umd.min.js +1 -1
  47. package/lib/language/fr-FR.js +29 -29
  48. package/lib/language/fr-FR.min.js +1 -1
  49. package/lib/language/fr-FR.umd.js +29 -29
  50. package/lib/layout-aside/src/layout-aside.js +9 -8
  51. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  52. package/lib/layout-body/src/layout-body.js +29 -22
  53. package/lib/layout-body/src/layout-body.min.js +1 -1
  54. package/lib/list/src/list.js +110 -47
  55. package/lib/list/src/list.min.js +1 -1
  56. package/lib/list/style/style.css +25 -8
  57. package/lib/list/style/style.min.css +1 -1
  58. package/lib/menu/src/menu.js +1 -1
  59. package/lib/menu/src/menu.min.js +1 -1
  60. package/lib/modal/src/modal.js +61 -10
  61. package/lib/modal/src/modal.min.js +1 -1
  62. package/lib/modal/style/style.css +15 -4
  63. package/lib/modal/style/style.min.css +1 -1
  64. package/lib/scrollbar/src/scrollbar.js +81 -17
  65. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  66. package/lib/style.css +1 -1
  67. package/lib/style.min.css +1 -1
  68. package/lib/tabs/src/tabs.js +23 -11
  69. package/lib/tabs/src/tabs.min.js +1 -1
  70. package/lib/tree/src/tree.js +412 -50
  71. package/lib/tree/src/tree.min.js +1 -1
  72. package/lib/tree/style/style.css +43 -0
  73. package/lib/tree/style/style.min.css +1 -1
  74. package/lib/ui/index.js +1 -1
  75. package/lib/ui/index.min.js +1 -1
  76. package/lib/ui/src/log.js +1 -1
  77. package/lib/ui/src/log.min.js +1 -1
  78. package/lib/ui/src/utils.js +4 -0
  79. package/lib/ui/src/utils.min.js +1 -1
  80. package/lib/vxe-drawer/style/style.css +13 -6
  81. package/lib/vxe-drawer/style/style.min.css +1 -1
  82. package/lib/vxe-list/style/style.css +25 -8
  83. package/lib/vxe-list/style/style.min.css +1 -1
  84. package/lib/vxe-modal/style/style.css +15 -4
  85. package/lib/vxe-modal/style/style.min.css +1 -1
  86. package/lib/vxe-tree/style/style.css +43 -0
  87. package/lib/vxe-tree/style/style.min.css +1 -1
  88. package/package.json +2 -2
  89. package/packages/card/src/card.ts +20 -4
  90. package/packages/drawer/src/drawer.ts +73 -16
  91. package/packages/language/fr-FR.ts +903 -903
  92. package/packages/layout-aside/src/layout-aside.ts +10 -6
  93. package/packages/layout-body/src/layout-body.ts +25 -15
  94. package/packages/list/src/list.ts +130 -55
  95. package/packages/menu/src/menu.ts +2 -2
  96. package/packages/modal/src/modal.ts +71 -14
  97. package/packages/scrollbar/src/scrollbar.ts +79 -18
  98. package/packages/tabs/src/tabs.ts +21 -7
  99. package/packages/tree/src/tree.ts +452 -62
  100. package/packages/ui/src/utils.ts +4 -0
  101. package/styles/components/drawer.scss +13 -6
  102. package/styles/components/list.scss +35 -10
  103. package/styles/components/modal.scss +12 -4
  104. package/styles/components/tree.scss +76 -0
  105. package/types/components/card.d.ts +10 -1
  106. package/types/components/drawer.d.ts +20 -0
  107. package/types/components/gantt-module/gantt-view.d.ts +24 -1
  108. package/types/components/gantt.d.ts +2 -0
  109. package/types/components/layout-aside.d.ts +10 -1
  110. package/types/components/layout-body.d.ts +10 -1
  111. package/types/components/list.d.ts +13 -2
  112. package/types/components/modal.d.ts +20 -0
  113. package/types/components/scrollbar.d.ts +17 -2
  114. package/types/components/table.d.ts +80 -6
  115. package/types/components/tabs.d.ts +10 -1
  116. package/types/components/tree.d.ts +35 -2
  117. /package/es/icon/{iconfont.1791880413927.ttf → iconfont.1792034967421.ttf} +0 -0
  118. /package/es/icon/{iconfont.1791880413927.woff → iconfont.1792034967421.woff} +0 -0
  119. /package/es/icon/{iconfont.1791880413927.woff2 → iconfont.1792034967421.woff2} +0 -0
  120. /package/es/{iconfont.1791880413927.ttf → iconfont.1792034967421.ttf} +0 -0
  121. /package/es/{iconfont.1791880413927.woff → iconfont.1792034967421.woff} +0 -0
  122. /package/es/{iconfont.1791880413927.woff2 → iconfont.1792034967421.woff2} +0 -0
  123. /package/lib/icon/style/{iconfont.1791880413927.ttf → iconfont.1792034967421.ttf} +0 -0
  124. /package/lib/icon/style/{iconfont.1791880413927.woff → iconfont.1792034967421.woff} +0 -0
  125. /package/lib/icon/style/{iconfont.1791880413927.woff2 → iconfont.1792034967421.woff2} +0 -0
  126. /package/lib/{iconfont.1791880413927.ttf → iconfont.1792034967421.ttf} +0 -0
  127. /package/lib/{iconfont.1791880413927.woff → iconfont.1792034967421.woff} +0 -0
  128. /package/lib/{iconfont.1791880413927.woff2 → iconfont.1792034967421.woff2} +0 -0
@@ -10,6 +10,7 @@ import { VxeToolbarConstructor, VxeToolbarInstance } from './toolbar'
10
10
  import { VxeTableCustomPanelConstructor } from './table-module/custom'
11
11
  import { VxeGanttConstructor, VxeGanttPrivateMethods } from './gantt'
12
12
  import { VxeGanttViewConstructor, VxeGanttViewInstance, VxeGanttViewPrivateMethods } from './gantt-module/gantt-view'
13
+ import { VxeScrollbarPropTypes } from './scrollbar'
13
14
 
14
15
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
15
16
 
@@ -2972,33 +2973,52 @@ export namespace VxeTablePropTypes {
2972
2973
  }
2973
2974
 
2974
2975
  export interface ScrollbarXConfig {
2976
+ /**
2977
+ * 滚动条高度
2978
+ */
2979
+ height?: number
2975
2980
  /**
2976
2981
  * 滚动条显示位置
2977
2982
  */
2978
2983
  position?: 'top' | 'bottom' | ''
2979
2984
  /**
2980
- * 滚动条显示方式
2985
+ * 是否显示
2981
2986
  */
2982
2987
  visible?: 'auto' | 'visible' | 'hidden' | boolean
2988
+ /**
2989
+ * 是否自动隐藏滚动条
2990
+ */
2991
+ autoHide?: boolean
2983
2992
  /**
2984
2993
  * 滚动行为
2994
+ * @deprecated
2985
2995
  */
2986
2996
  overscrollBehavior?: 'contain' | 'none' | ''
2987
2997
  }
2988
2998
  export interface ScrollbarYConfig {
2999
+ /**
3000
+ * 滚动条宽度
3001
+ */
3002
+ width?: number
2989
3003
  /**
2990
3004
  * 滚动条显示位置
2991
3005
  */
2992
3006
  position?: 'left' | 'right' | ''
2993
3007
  /**
2994
- * 滚动条显示方式
3008
+ * 是否显示
2995
3009
  */
2996
3010
  visible?: 'auto' | 'visible' | 'hidden' | boolean
3011
+ /**
3012
+ * 是否自动隐藏滚动条
3013
+ */
3014
+ autoHide?: boolean
2997
3015
  /**
2998
3016
  * 滚动行为
3017
+ * @deprecated
2999
3018
  */
3000
3019
  overscrollBehavior?: 'contain' | 'none' | ''
3001
3020
  }
3021
+ export type UseScrollbar = boolean
3002
3022
  /**
3003
3023
  * 滚动条配置项
3004
3024
  */
@@ -3011,18 +3031,38 @@ export namespace VxeTablePropTypes {
3011
3031
  * 滚动条高度
3012
3032
  */
3013
3033
  height?: number
3034
+ padding?: boolean
3035
+ /**
3036
+ * 是否自动隐藏滚动条
3037
+ */
3038
+ autoHide?: boolean
3039
+ /**
3040
+ * 是否显示
3041
+ */
3042
+ visible?: boolean
3014
3043
  /**
3015
3044
  * 滚动行为
3045
+ * @deprecated
3016
3046
  */
3017
3047
  overscrollBehavior?: 'contain' | 'none' | ''
3018
3048
  /**
3019
- * 横向滚动条
3049
+ * 已废弃,请使用 xConfig
3050
+ * @deprecated
3020
3051
  */
3021
3052
  x?: ScrollbarXConfig
3022
3053
  /**
3023
- * 纵向滚动条
3054
+ * 横向滚动条
3055
+ */
3056
+ xConfig?: ScrollbarXConfig
3057
+ /**
3058
+ * 已废弃,请使用 yConfig
3059
+ * @deprecated
3024
3060
  */
3025
3061
  y?: ScrollbarYConfig
3062
+ /**
3063
+ * 纵向滚动条
3064
+ */
3065
+ yConfig?: ScrollbarYConfig
3026
3066
  }
3027
3067
 
3028
3068
  /**
@@ -3868,6 +3908,10 @@ export interface VxeTableProps<D = any> {
3868
3908
  * 纵向虚拟滚动配置
3869
3909
  */
3870
3910
  virtualYConfig?: VxeTablePropTypes.VirtualYConfig
3911
+ /**
3912
+ * 使用虚拟滚动条
3913
+ */
3914
+ useScrollbar?: VxeTablePropTypes.UseScrollbar
3871
3915
  /**
3872
3916
  * 滚动条配置项
3873
3917
  */
@@ -3956,8 +4000,15 @@ export interface TablePrivateComputed<D = any> {
3956
4000
  computeScrollbarOpts: ComputedRef<VxeTablePropTypes.ScrollbarConfig>
3957
4001
  computeScrollbarXOpts: ComputedRef<VxeTablePropTypes.ScrollbarXConfig>
3958
4002
  computeScrollbarYOpts: ComputedRef<VxeTablePropTypes.ScrollbarYConfig>
4003
+ computeScrollXHeight: ComputedRef<number | undefined>
4004
+ computeScrollYWidth: ComputedRef<number | undefined>
4005
+ computeScrollXVisible: ComputedRef<'auto' | 'visible' | 'hidden' | boolean | undefined>
4006
+ computeScrollYVisible: ComputedRef<'auto' | 'visible' | 'hidden' | boolean | undefined>
4007
+ computeScrollXAutoHide: ComputedRef<VxeScrollbarPropTypes.AutoHide | undefined>
4008
+ computeScrollYAutoHide: ComputedRef<VxeScrollbarPropTypes.AutoHide | undefined>
3959
4009
  computeScrollbarXToTop: ComputedRef<boolean>
3960
4010
  computeScrollbarYToLeft: ComputedRef<boolean>
4011
+ computeScrollbarWrapperClss: ComputedRef<string>
3961
4012
  computeColumnOpts: ComputedRef<VxeTablePropTypes.ColumnOpts>
3962
4013
  computeCurrentColumnOpts: ComputedRef<VxeTablePropTypes.CurrentColumnConfig>
3963
4014
  computeScrollXThreshold: ComputedRef<number>
@@ -4076,6 +4127,11 @@ export interface TableReactData<D = any> {
4076
4127
  scrollbarWidth: number
4077
4128
  // 横向滚动条的高度
4078
4129
  scrollbarHeight: number
4130
+
4131
+ // 滚动条
4132
+ yThumbHeight: number
4133
+ xThumbWidth: number
4134
+
4079
4135
  /**
4080
4136
  * 行高
4081
4137
  * @deprecated
@@ -4317,9 +4373,17 @@ export interface TableInternalData<D = any> {
4317
4373
  currentRow: D | null
4318
4374
  currentCol: VxeTableDefines.ColumnInfo | null
4319
4375
 
4320
- // 最后滚动位置
4321
- lastScrollLeft: number
4376
+ resizeObserver?: ResizeObserver
4377
+
4378
+ // 滚动条
4379
+ scrollObserver?: ResizeObserver
4380
+ isThumbDrag?: boolean
4381
+ thumbDragOffset: number
4382
+ yThumbTop: number
4383
+ xThumbLeft: number
4322
4384
  lastScrollTop: number
4385
+ lastScrollLeft: number
4386
+
4323
4387
  // 单选框属性,已选中保留的行
4324
4388
  radioReserveRow: any
4325
4389
  // 复选框属性,已选中保留的行
@@ -5916,6 +5980,16 @@ export interface TablePrivateMethods<D = any> {
5916
5980
  row: any
5917
5981
  column: VxeTableDefines.ColumnInfo
5918
5982
  }, cellValue?: any): Promise<any>
5983
+ /**
5984
+ * 内部方法
5985
+ * @private
5986
+ */
5987
+ updateScrollbar(): void
5988
+ /**
5989
+ * 内部方法
5990
+ * @private
5991
+ */
5992
+ updateThumbOffset(): void
5919
5993
  /**
5920
5994
  * 内部方法
5921
5995
  * @private
@@ -114,7 +114,16 @@ export namespace VxeTabsPropTypes {
114
114
  }) => boolean
115
115
  }
116
116
  export type UseScrollbar = boolean
117
- export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'xConfig' | 'yConfig' | 'padding' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
117
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
118
+ /**
119
+ * 滚动条宽度
120
+ */
121
+ width?: number | string
122
+ /**
123
+ * 滚动条高度
124
+ */
125
+ height?: number | string
126
+ }
118
127
  }
119
128
 
120
129
  export type VxeTabsProps = {
@@ -2,6 +2,7 @@ import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
3
3
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
4
4
  import { VxeTooltipPropTypes } from './tooltip'
5
+ import { VxeScrollbarProps } from './scrollbar'
5
6
 
6
7
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
7
8
 
@@ -331,6 +332,17 @@ export namespace VxeTreePropTypes {
331
332
  */
332
333
  enabled?: boolean
333
334
  }
335
+ export type UseScrollbar = boolean
336
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
337
+ /**
338
+ * 滚动条宽度
339
+ */
340
+ width?: number | string
341
+ /**
342
+ * 滚动条高度
343
+ */
344
+ height?: number | string
345
+ }
334
346
  }
335
347
 
336
348
  export interface VxeTreeProps<D = any> {
@@ -410,6 +422,14 @@ export interface VxeTreeProps<D = any> {
410
422
  iconLoaded?: VxeTreePropTypes.IconLoaded
411
423
  size?: VxeTreePropTypes.Size
412
424
  virtualYConfig?: VxeTreePropTypes.VirtualYConfig
425
+ /**
426
+ * 使用虚拟滚动条
427
+ */
428
+ useScrollbar?: VxeTreePropTypes.UseScrollbar
429
+ /**
430
+ * 滚动条配置项
431
+ */
432
+ scrollbarConfig?: VxeTreePropTypes.ScrollbarConfig
413
433
  }
414
434
 
415
435
  export interface TreePrivateComputed<D = any> {
@@ -438,6 +458,10 @@ export interface TreeReactData {
438
458
  updateExpandedFlag: number
439
459
  updateCheckboxFlag: number
440
460
 
461
+ // 滚动条
462
+ yThumbHeight: number
463
+ xThumbWidth: number
464
+
441
465
  insertNodeFlag: number
442
466
  removeNodeFlag: number
443
467
 
@@ -453,7 +477,6 @@ export interface TreeReactData {
453
477
 
454
478
  export interface TreeInternalData {
455
479
  initialized?: boolean
456
- resizeObserver?: ResizeObserver
457
480
  lastFilterValue?: string
458
481
  afterTreeList: any[]
459
482
  treeFullData: any[]
@@ -463,8 +486,18 @@ export interface TreeInternalData {
463
486
  selectCheckboxMaps: Record<string, any>
464
487
  treeExpandedMaps: Record<string, boolean>
465
488
  treeExpandLazyLoadedMaps: Record<string, boolean>
466
- lastScrollLeft: number
489
+
490
+ resizeObserver?: ResizeObserver
491
+
492
+ // 滚动条
493
+ scrollObserver?: ResizeObserver
494
+ isThumbDrag?: boolean
495
+ thumbDragOffset: number
496
+ yThumbTop: number
497
+ xThumbLeft: number
467
498
  lastScrollTop: number
499
+ lastScrollLeft: number
500
+
468
501
  scrollYStore: {
469
502
  startIndex: number
470
503
  endIndex: number