vxe-pc-ui 3.19.6 → 3.19.8

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 (109) hide show
  1. package/es/card/src/card.js +48 -11
  2. package/es/card/style.css +42 -44
  3. package/es/card/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/list/src/list.js +6 -2
  6. package/es/row/src/col.js +42 -17
  7. package/es/row/src/row.js +35 -15
  8. package/es/row/style.css +101 -24
  9. package/es/row/style.min.css +1 -1
  10. package/es/scrollbar/src/scrollbar.js +11 -1
  11. package/es/scrollbar/style.css +5 -5
  12. package/es/scrollbar/style.min.css +1 -1
  13. package/es/space/style.css +1 -0
  14. package/es/space/style.min.css +1 -1
  15. package/es/style.css +1 -1
  16. package/es/style.min.css +1 -1
  17. package/es/tabs/src/tabs.js +35 -8
  18. package/es/tabs/style.css +4 -2
  19. package/es/tabs/style.min.css +1 -1
  20. package/es/tree/src/tree.js +6 -2
  21. package/es/ui/index.js +1 -1
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-card/style.css +42 -44
  24. package/es/vxe-card/style.min.css +1 -1
  25. package/es/vxe-row/style.css +101 -24
  26. package/es/vxe-row/style.min.css +1 -1
  27. package/es/vxe-scrollbar/style.css +5 -5
  28. package/es/vxe-scrollbar/style.min.css +1 -1
  29. package/es/vxe-space/style.css +1 -0
  30. package/es/vxe-space/style.min.css +1 -1
  31. package/es/vxe-tabs/style.css +4 -2
  32. package/es/vxe-tabs/style.min.css +1 -1
  33. package/lib/card/src/card.js +55 -5
  34. package/lib/card/src/card.min.js +1 -1
  35. package/lib/card/style/style.css +42 -44
  36. package/lib/card/style/style.min.css +1 -1
  37. package/lib/icon/style/style.css +1 -1
  38. package/lib/icon/style/style.min.css +1 -1
  39. package/lib/index.umd.js +6334 -6176
  40. package/lib/index.umd.min.js +1 -1
  41. package/lib/list/src/list.js +4 -0
  42. package/lib/list/src/list.min.js +1 -1
  43. package/lib/row/src/col.js +47 -20
  44. package/lib/row/src/col.min.js +1 -1
  45. package/lib/row/src/row.js +41 -16
  46. package/lib/row/src/row.min.js +1 -1
  47. package/lib/row/style/style.css +101 -24
  48. package/lib/row/style/style.min.css +1 -1
  49. package/lib/scrollbar/src/scrollbar.js +11 -0
  50. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  51. package/lib/scrollbar/style/style.css +5 -5
  52. package/lib/scrollbar/style/style.min.css +1 -1
  53. package/lib/space/style/style.css +1 -0
  54. package/lib/space/style/style.min.css +1 -1
  55. package/lib/style.css +1 -1
  56. package/lib/style.min.css +1 -1
  57. package/lib/tabs/src/tabs.js +45 -8
  58. package/lib/tabs/src/tabs.min.js +1 -1
  59. package/lib/tabs/style/style.css +4 -2
  60. package/lib/tabs/style/style.min.css +1 -1
  61. package/lib/tree/src/tree.js +4 -0
  62. package/lib/tree/src/tree.min.js +1 -1
  63. package/lib/ui/index.js +1 -1
  64. package/lib/ui/index.min.js +1 -1
  65. package/lib/ui/src/log.js +1 -1
  66. package/lib/ui/src/log.min.js +1 -1
  67. package/lib/vxe-card/style/style.css +42 -44
  68. package/lib/vxe-card/style/style.min.css +1 -1
  69. package/lib/vxe-row/style/style.css +101 -24
  70. package/lib/vxe-row/style/style.min.css +1 -1
  71. package/lib/vxe-scrollbar/style/style.css +5 -5
  72. package/lib/vxe-scrollbar/style/style.min.css +1 -1
  73. package/lib/vxe-space/style/style.css +1 -0
  74. package/lib/vxe-space/style/style.min.css +1 -1
  75. package/lib/vxe-tabs/style/style.css +4 -2
  76. package/lib/vxe-tabs/style/style.min.css +1 -1
  77. package/package.json +1 -1
  78. package/packages/card/src/card.ts +65 -11
  79. package/packages/list/src/list.ts +6 -2
  80. package/packages/row/src/col.ts +44 -17
  81. package/packages/row/src/row.ts +37 -16
  82. package/packages/scrollbar/src/scrollbar.ts +11 -1
  83. package/packages/tabs/src/tabs.ts +40 -8
  84. package/packages/tree/src/tree.ts +6 -2
  85. package/styles/components/card.scss +44 -58
  86. package/styles/components/row.scss +21 -3
  87. package/styles/components/scrollbar.scss +15 -11
  88. package/styles/components/space.scss +1 -0
  89. package/styles/components/tabs.scss +2 -1
  90. package/types/components/card.d.ts +11 -0
  91. package/types/components/grid.d.ts +37 -0
  92. package/types/components/layout-aside.d.ts +6 -0
  93. package/types/components/layout-body.d.ts +6 -0
  94. package/types/components/menu.d.ts +6 -0
  95. package/types/components/row.d.ts +3 -1
  96. package/types/components/table.d.ts +3 -4
  97. package/types/components/tabs.d.ts +11 -0
  98. /package/es/icon/{iconfont.1791769634184.ttf → iconfont.1791862954819.ttf} +0 -0
  99. /package/es/icon/{iconfont.1791769634184.woff → iconfont.1791862954819.woff} +0 -0
  100. /package/es/icon/{iconfont.1791769634184.woff2 → iconfont.1791862954819.woff2} +0 -0
  101. /package/es/{iconfont.1791769634184.ttf → iconfont.1791862954819.ttf} +0 -0
  102. /package/es/{iconfont.1791769634184.woff → iconfont.1791862954819.woff} +0 -0
  103. /package/es/{iconfont.1791769634184.woff2 → iconfont.1791862954819.woff2} +0 -0
  104. /package/lib/icon/style/{iconfont.1791769634184.ttf → iconfont.1791862954819.ttf} +0 -0
  105. /package/lib/icon/style/{iconfont.1791769634184.woff → iconfont.1791862954819.woff} +0 -0
  106. /package/lib/icon/style/{iconfont.1791769634184.woff2 → iconfont.1791862954819.woff2} +0 -0
  107. /package/lib/{iconfont.1791769634184.ttf → iconfont.1791862954819.ttf} +0 -0
  108. /package/lib/{iconfont.1791769634184.woff → iconfont.1791862954819.woff} +0 -0
  109. /package/lib/{iconfont.1791769634184.woff2 → iconfont.1791862954819.woff2} +0 -0
@@ -3,15 +3,22 @@ import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { getConfig, createEvent, globalMixins } from '../../ui'
5
5
  import { toCssUnit } from '../../ui/src/dom'
6
+ import { createComponentLog } from '../../ui/src/log'
6
7
 
7
8
  import type { VxeRowPropTypes, RowReactData, VxeRowEmits, ValueOf } from '../../../types'
8
9
 
10
+ const { warnLog } = createComponentLog('row')
11
+
9
12
  export default /* define-vxe-component start */ defineVxeComponent({
10
13
  name: 'VxeRow',
11
14
  mixins: [
12
15
  globalMixins.sizeMixin
13
16
  ],
14
17
  props: {
18
+ gridLayout: {
19
+ type: Boolean as PropType<VxeRowPropTypes.GridLayout>,
20
+ default: () => getConfig().row.gridLayout
21
+ },
15
22
  gutter: [Number, String, Array] as PropType<VxeRowPropTypes.Gutter>,
16
23
  wrap: {
17
24
  type: Boolean as PropType<VxeRowPropTypes.Wrap>,
@@ -42,23 +49,28 @@ export default /* define-vxe-component start */ defineVxeComponent({
42
49
  const $xeRow = this
43
50
  const props = $xeRow
44
51
 
45
- const { gutter, vertical } = props
52
+ const { gridLayout, gutter, vertical } = props
46
53
  const style: Record<string, string | number> = {}
47
54
  if (gutter) {
48
55
  let [lrGutter, tbGutter] = XEUtils.isArray(gutter) ? gutter : [gutter]
49
- if (vertical) {
50
- tbGutter = lrGutter
51
- lrGutter = ''
52
- }
53
- if (lrGutter) {
54
- const offsetSize = XEUtils.isNumber(lrGutter) ? toCssUnit(-(lrGutter / 2)) : `calc(${toCssUnit(lrGutter)} / 2 * -1)`
55
- style.marginLeft = offsetSize
56
- style.marginRight = offsetSize
57
- }
58
- if (tbGutter) {
59
- const offsetSize = XEUtils.isNumber(tbGutter) ? toCssUnit(-(tbGutter / 2)) : `calc(${toCssUnit(tbGutter)} / 2 * -1)`
60
- style.marginTop = offsetSize
61
- style.marginBottom = offsetSize
56
+ if (gridLayout) {
57
+ style.columnGap = toCssUnit(lrGutter)
58
+ style.rowGap = toCssUnit(tbGutter || lrGutter)
59
+ } else {
60
+ if (vertical) {
61
+ tbGutter = lrGutter
62
+ lrGutter = ''
63
+ }
64
+ if (lrGutter) {
65
+ const offsetSize = XEUtils.isNumber(lrGutter) ? toCssUnit(-(lrGutter / 2)) : `calc(${toCssUnit(lrGutter)} / 2 * -1)`
66
+ style.marginLeft = offsetSize
67
+ style.marginRight = offsetSize
68
+ }
69
+ if (tbGutter) {
70
+ const offsetSize = XEUtils.isNumber(tbGutter) ? toCssUnit(-(tbGutter / 2)) : `calc(${toCssUnit(tbGutter)} / 2 * -1)`
71
+ style.marginTop = offsetSize
72
+ style.marginBottom = offsetSize
73
+ }
62
74
  }
63
75
  }
64
76
  return style
@@ -84,12 +96,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
84
96
  const props = $xeRow
85
97
  const slots = $xeRow.$scopedSlots
86
98
 
87
- const { vertical, wrap } = props
99
+ const { gridLayout, vertical, wrap } = props
88
100
  const rowStyle = $xeRow.computeRowStyle
89
101
  const defaultSlot = slots.default
90
102
  return h('div', {
91
103
  ref: 'refElem',
92
- class: ['vxe-row', {
104
+ class: ['vxe-row', gridLayout ? 'grid--layout' : 'def--layout', {
93
105
  'is--vertical': vertical,
94
106
  'is--wrap': wrap
95
107
  }],
@@ -100,6 +112,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
100
112
  }, defaultSlot ? defaultSlot({}) : [])
101
113
  }
102
114
  },
115
+ mounted () {
116
+ const $xeRow = this
117
+ const props = $xeRow
118
+
119
+ const { gridLayout, wrap } = props
120
+ if (gridLayout && !wrap) {
121
+ warnLog('vxe.error.notSupportProp', ['grid-layout', 'wrap=false', 'wrap=true'])
122
+ }
123
+ },
103
124
  render (this: any, h) {
104
125
  return this.renderVN(h)
105
126
  }
@@ -8,7 +8,7 @@ import VxeLoadingComponent from '../../loading'
8
8
 
9
9
  import type { ScrollbarReactData, ScrollbarInternalData, VxeScrollbarEmits, ValueOf, VxeScrollbarPropTypes, VxeComponentStyleType } from '../../../types'
10
10
 
11
- const { getConfig, createEvent, domUtils, globalResize, renderEmptyElement } = VxeUI
11
+ const { getConfig, createEvent, domUtils, globalResize, globalEvents, renderEmptyElement } = VxeUI
12
12
 
13
13
  function createReactData (): ScrollbarReactData {
14
14
  return {
@@ -279,6 +279,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
279
279
  if (!viewEl) {
280
280
  return
281
281
  }
282
+ if (!viewEl.clientHeight || !viewEl.clientHeight) {
283
+ return
284
+ }
282
285
  const trackXEl = $xeScrollbar.$refs.refTrackXElem as HTMLDivElement
283
286
  const xThumbWidth = trackXEl ? getThumbSize(viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth) : 0
284
287
  const thumbXElem = $xeScrollbar.$refs.refThumbXElem as HTMLDivElement
@@ -303,6 +306,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
303
306
  const viewEl = $xeScrollbar.$refs.refViewElem as HTMLDivElement
304
307
  if (!viewEl) {
305
308
  return
309
+ if (!viewEl.clientHeight || !viewEl.clientHeight) {
310
+ return
311
+ }
306
312
  }
307
313
  const { xThumbWidth, yThumbHeight } = reactData
308
314
  const trackXEl = $xeScrollbar.$refs.refTrackXElem as HTMLDivElement
@@ -693,6 +699,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
693
699
  }
694
700
 
695
701
  $xeScrollbar.reFlag++
702
+ globalEvents.on($xeScrollbar, 'resize', () => {
703
+ $xeScrollbar.reFlag++
704
+ })
696
705
  },
697
706
  beforeDestroy () {
698
707
  const $xeScrollbar = this
@@ -702,6 +711,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
702
711
  if (resizeObserver) {
703
712
  resizeObserver.disconnect()
704
713
  }
714
+ globalEvents.off($xeScrollbar, 'resize')
705
715
  },
706
716
  destroyed () {
707
717
  const $xeScrollbar = this
@@ -7,6 +7,7 @@ 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
9
  import VxeLoadingComponent from '../../loading'
10
+ import VxeScrollbarComponent from '../../scrollbar'
10
11
 
11
12
  import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, VxeComponentSizeType, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, VxeComponentStyleType } from '../../../types'
12
13
 
@@ -55,6 +56,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
55
56
  type: String as PropType<VxeTabsPropTypes.Size>,
56
57
  default: () => getConfig().tabs.size || getConfig().size
57
58
  },
59
+ useScrollbar: {
60
+ type: Boolean as PropType<VxeTabsPropTypes.UseScrollbar>,
61
+ default: () => getConfig().tabs.useScrollbar
62
+ },
63
+ scrollbarConfig: Object as PropType<VxeTabsPropTypes.ScrollbarConfig>,
58
64
  // 已废弃
59
65
  beforeCloseMethod: Function as PropType<VxeTabsPropTypes.BeforeCloseMethod>
60
66
  },
@@ -181,6 +187,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
181
187
 
182
188
  const staticTabs = reactData.staticTabs as VxeTabPaneDefines.TabConfig[]
183
189
  return staticTabs.filter((item) => $xeTabs.handleFilterTab(item))
190
+ },
191
+ computeScrollbarOpts () {
192
+ const $xeTabs = this
193
+ const props = $xeTabs
194
+
195
+ return Object.assign({}, getConfig().tabs.scrollbarConfig, props.scrollbarConfig)
184
196
  }
185
197
  },
186
198
  methods: {
@@ -821,19 +833,39 @@ export default /* define-vxe-component start */ defineVxeComponent({
821
833
  },
822
834
  renderTabPane (h: CreateElement, item: VxeTabPaneProps | VxeTabPaneDefines.TabConfig) {
823
835
  const $xeTabs = this
836
+ const props = $xeTabs
824
837
  const reactData = $xeTabs.reactData
825
838
 
839
+ const { useScrollbar } = props
826
840
  const { initNames, activeName } = reactData
827
841
  const { name, slots } = item
828
842
  const defaultSlot = slots ? slots.default : null
829
- return name && initNames.includes(name)
830
- ? h('div', {
831
- key: `${name}`,
832
- class: ['vxe-tabs-pane--item', {
833
- 'is--visible': activeName === name
834
- }]
835
- }, defaultSlot ? $xeTabs.callSlot(defaultSlot, { name }, h) : [])
836
- : renderEmptyElement($xeTabs)
843
+ const scrollbarOpts = $xeTabs.computeScrollbarOpts
844
+ const { viewClassName, viewInnerClassName } = scrollbarOpts
845
+ if (name && initNames.includes(name)) {
846
+ return useScrollbar
847
+ ? h(VxeScrollbarComponent, {
848
+ key: `${name}`,
849
+ class: ['vxe-tabs-pane--scrollbar-item', {
850
+ 'is--visible': activeName === name
851
+ }],
852
+ props: {
853
+ ...scrollbarOpts,
854
+ viewClassName: 'vxe-tabs-pane--scrollbar-item-view' + (viewClassName ? (' ' + viewClassName) : ''),
855
+ viewInnerClassName: 'vxe-tabs-pane--scrollbar-item-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
856
+ },
857
+ scopedSlots: {
858
+ default: () => defaultSlot ? $xeTabs.callSlot(defaultSlot, { name }, h) : []
859
+ }
860
+ })
861
+ : h('div', {
862
+ key: `${name}`,
863
+ class: ['vxe-tabs-pane--item', {
864
+ 'is--visible': activeName === name
865
+ }]
866
+ }, defaultSlot ? $xeTabs.callSlot(defaultSlot, { name }, h) : [])
867
+ }
868
+ return renderEmptyElement($xeTabs)
837
869
  },
838
870
  renderTabContent (h: CreateElement, tabList: VxeTabsPropTypes.Options | VxeTabPaneDefines.TabConfig[]) {
839
871
  const $xeTabs = this
@@ -6,7 +6,7 @@ import { calcTreeLine, getItemCacheObj } from './util'
6
6
  import { createComponentLog } from '../../ui/src/log'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
  import { crossTreeDragNodeGlobal, getCrossTreeDragNodeInfo } from './store'
9
- import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, getTpImg, hasControlKey, getEventTargetNode } from '../../ui/src/dom'
9
+ import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, getTpImg, hasControlKey, getEventTargetNode, hasClass } from '../../ui/src/dom'
10
10
  import { isEnableConf, enModelValue, deModelValue, getText } from '../../ui/src/utils'
11
11
  import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime'
12
12
  import VxeLoadingComponent from '../../loading'
@@ -1574,11 +1574,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
1574
1574
  const { rowHeight } = scrollYStore
1575
1575
  const el = $xeTree.$refs.refElem as HTMLDivElement
1576
1576
  if (el && el.clientWidth && el.clientHeight) {
1577
- const parentEl = $xeTree.getParentElem()
1577
+ let parentEl = $xeTree.getParentElem()
1578
1578
  const headerWrapperEl = $xeTree.$refs.refHeaderWrapperElem as HTMLDivElement
1579
1579
  const footerWrapperEl = $xeTree.$refs.refFooterWrapperElem as HTMLDivElement
1580
1580
  const headHeight = headerWrapperEl ? headerWrapperEl.clientHeight : 0
1581
1581
  const footHeight = footerWrapperEl ? footerWrapperEl.clientHeight : 0
1582
+ // 如果是虚拟滚动条
1583
+ if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
1584
+ parentEl = parentEl.parentElement
1585
+ }
1582
1586
  if (parentEl) {
1583
1587
  const parentPaddingSize = getPaddingTopBottomSize(parentEl)
1584
1588
  reactData.parentHeight = Math.max(headHeight + footHeight + rowHeight, parentEl.clientHeight - parentPaddingSize - headHeight - footHeight)
@@ -1,8 +1,34 @@
1
+ // 局部变量
2
+ .vxe-card {
3
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-default);
4
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-default);
5
+ &.size--xlarge {
6
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-xlarge);
7
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-xlarge);
8
+ }
9
+ &.size--large {
10
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-large);
11
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-large);
12
+ }
13
+ &.size--medium {
14
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-medium);
15
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-medium);
16
+ }
17
+ &.size--small {
18
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-small);
19
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-small);
20
+ }
21
+ &.size--mini {
22
+ --vxe-ui-card-current-font-size: var(--vxe-ui-font-size-mini);
23
+ --vxe-ui-card-current-padding: var(--vxe-ui-card-padding-mini);
24
+ }
25
+ }
26
+
1
27
  .vxe-card {
2
28
  position: relative;
3
29
  display: inline-flex;
4
30
  flex-direction: column;
5
- font-size: var(--vxe-ui-font-size-default);
31
+ font-size: var(--vxe-ui-card-current-font-size);
6
32
  color: var(--vxe-ui-font-color);
7
33
  font-family: var(--vxe-ui-font-family);
8
34
  background-color: var(--vxe-ui-layout-background-color);
@@ -33,19 +59,25 @@
33
59
  flex-grow: 1;
34
60
  }
35
61
  .vxe-card--body-left,
62
+ .vxe-card--body-scrollbar-left,
36
63
  .vxe-card--body-right,
37
- .vxe-card--body-content {
64
+ .vxe-card--body-scrollbar-right,
65
+ .vxe-card--body-content,
66
+ .vxe-card--body-scrollbar-content {
38
67
  overflow: auto;
39
68
  }
40
69
  .vxe-card--header,
41
70
  .vxe-card--header-extra,
42
71
  .vxe-card--footer,
43
72
  .vxe-card--body-left,
44
- .vxe-card--body-right {
73
+ .vxe-card--body-scrollbar-left,
74
+ .vxe-card--body-right,
75
+ .vxe-card--body-scrollbar-right {
45
76
  flex-shrink: 0;
46
77
  }
47
78
  .vxe-card--header-title,
48
- .vxe-card--body-content {
79
+ .vxe-card--body-content,
80
+ .vxe-card--body-scrollbar-content {
49
81
  flex-grow: 1;
50
82
  }
51
83
  .vxe-card--header-title {
@@ -57,66 +89,20 @@
57
89
  }
58
90
 
59
91
  .vxe-card {
60
- font-size: var(--vxe-ui-font-size-default);
61
92
  & > .vxe-card--header,
62
93
  & > .vxe-card--footer {
63
- padding: var(--vxe-ui-card-padding-default);
94
+ padding: var(--vxe-ui-card-current-padding);
64
95
  }
65
96
  &.is--padding {
66
97
  & > .vxe-card--body {
67
- .vxe-card--body-content,
68
98
  .vxe-card--body-left,
69
- .vxe-card--body-right {
70
- padding: var(--vxe-ui-card-padding-default);
71
- }
72
- }
73
- }
74
- &.size--medium {
75
- font-size: var(--vxe-ui-font-size-medium);
76
- & > .vxe-card--header,
77
- & > .vxe-card--footer {
78
- padding: var(--vxe-ui-card-padding-medium);
79
- }
80
- &.is--padding {
81
- & > .vxe-card--body {
82
- .vxe-card--body-content,
83
- .vxe-card--body-left,
84
- .vxe-card--body-right {
85
- padding: var(--vxe-ui-card-padding-medium);
86
- }
87
- }
88
- }
89
- }
90
- &.size--small {
91
- font-size: var(--vxe-ui-font-size-small);
92
- & > .vxe-card--header,
93
- & > .vxe-card--footer {
94
- padding: var(--vxe-ui-card-padding-small);
95
- }
96
- &.is--padding {
97
- & > .vxe-card--body {
98
- .vxe-card--body-content,
99
- .vxe-card--body-left,
100
- .vxe-card--body-right {
101
- padding: var(--vxe-ui-card-padding-small);
102
- }
103
- }
104
- }
105
- }
106
- &.size--mini {
107
- font-size: var(--vxe-ui-font-size-mini);
108
- & > .vxe-card--header,
109
- & > .vxe-card--footer {
110
- padding: var(--vxe-ui-card-padding-mini);
111
- }
112
- &.is--padding {
113
- & > .vxe-card--body {
114
- .vxe-card--body-content,
115
- .vxe-card--body-left,
116
- .vxe-card--body-right {
117
- padding: var(--vxe-ui-card-padding-mini);
118
- }
99
+ .vxe-card--body-scrollbar-left-view,
100
+ .vxe-card--body-right,
101
+ .vxe-card--body-scrollbar-right-view,
102
+ .vxe-card--body-content,
103
+ .vxe-card--body-scrollbar-content-view {
104
+ padding: var(--vxe-ui-card-current-padding);
119
105
  }
120
106
  }
121
107
  }
122
- }
108
+ }
@@ -36,9 +36,27 @@
36
36
  &.align--right {
37
37
  text-align: right;
38
38
  }
39
- @for $i from 0 to list.length(base_var.$colSpanList) {
40
- &.span#{$i + 1} {
41
- width: list.nth(base_var.$colSpanList, $i + 1);
39
+ }
40
+
41
+ .vxe-row {
42
+ &.def--layout {
43
+ & > .vxe-col {
44
+ @for $i from 0 to list.length(base_var.$colSpanList) {
45
+ &.span#{$i + 1} {
46
+ width: list.nth(base_var.$colSpanList, $i + 1);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ &.grid--layout {
52
+ display: grid;
53
+ grid-template-columns: repeat(24, minmax(0, 1fr));
54
+ & > .vxe-col {
55
+ @for $i from 0 to list.length(base_var.$colSpanList) {
56
+ &.span#{$i + 1} {
57
+ grid-column: span $i + 1;
58
+ }
59
+ }
42
60
  }
43
61
  }
44
62
  }
@@ -1,7 +1,6 @@
1
1
  @use '../helpers/baseMixin.scss';
2
2
 
3
3
  .vxe-scrollbar {
4
- width: 100%;
5
4
  position: relative;
6
5
  &.is--virtual {
7
6
  & > .vxe-scrollbar--view {
@@ -74,6 +73,7 @@
74
73
  display: none;
75
74
  position: absolute;
76
75
  background-color: var(--vxe-ui-scrollbar-track-background-color);
76
+ overflow: hidden;
77
77
  user-select: none;
78
78
  }
79
79
  .vxe-scrollbar {
@@ -152,17 +152,21 @@
152
152
 
153
153
  .vxe-scrollbar {
154
154
  &.is--padding {
155
- &.sx-pos--top {
156
- padding-top: var(--vxe-ui-scrollbar-x-height);
157
- }
158
- &.sx-pos--bottom {
159
- padding-bottom: var(--vxe-ui-scrollbar-x-height);
160
- }
161
- &.sy-pos--left {
162
- padding-left: var(--vxe-ui-scrollbar-y-width);
155
+ &.overflow-x {
156
+ &.sx-pos--top {
157
+ padding-top: var(--vxe-ui-scrollbar-x-height);
158
+ }
159
+ &.sx-pos--bottom {
160
+ padding-bottom: var(--vxe-ui-scrollbar-x-height);
161
+ }
163
162
  }
164
- &.sy-pos--right {
165
- padding-right: var(--vxe-ui-scrollbar-y-width);
163
+ &.overflow-y {
164
+ &.sy-pos--left {
165
+ padding-left: var(--vxe-ui-scrollbar-y-width);
166
+ }
167
+ &.sy-pos--right {
168
+ padding-right: var(--vxe-ui-scrollbar-y-width);
169
+ }
166
170
  }
167
171
  }
168
172
  }
@@ -38,6 +38,7 @@
38
38
  &.is--fill {
39
39
  & > .vxe-space--item {
40
40
  flex-grow: 1;
41
+ min-width: 100%;
41
42
  }
42
43
  }
43
44
  }
@@ -470,7 +470,8 @@ $scrollbarOffsetSize: 20px;
470
470
  overflow: auto;
471
471
  }
472
472
 
473
- .vxe-tabs-pane--item {
473
+ .vxe-tabs-pane--item,
474
+ .vxe-tabs-pane--scrollbar-item {
474
475
  display: none;
475
476
  height: 100%;
476
477
  overflow: auto;
@@ -1,4 +1,5 @@
1
1
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } 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
 
@@ -25,6 +26,8 @@ export namespace VxeCardPropTypes {
25
26
  export type Shadow = boolean
26
27
  export type Padding = boolean
27
28
  export type Size = VxeComponentSizeType
29
+ export type UseScrollbar = boolean
30
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'native' | 'yConfig' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {}
28
31
  }
29
32
 
30
33
  export type VxeCardProps = {
@@ -37,6 +40,14 @@ export type VxeCardProps = {
37
40
  shadow?: VxeCardPropTypes.Shadow
38
41
  padding?: VxeCardPropTypes.Padding
39
42
  size?: VxeCardPropTypes.Size
43
+ /**
44
+ * 使用虚拟滚动条
45
+ */
46
+ useScrollbar?: VxeCardPropTypes.UseScrollbar
47
+ /**
48
+ * 滚动条配置项
49
+ */
50
+ scrollbarConfig?: VxeCardPropTypes.ScrollbarConfig
40
51
  }
41
52
 
42
53
  export interface CardPrivateComputed {
@@ -659,13 +659,50 @@ export interface GridMethods<D = any> {
659
659
  export interface VxeGridMethods<D = any> extends GridMethods<D>, Omit<TableMethods<D>, 'dispatchEvent'> { }
660
660
 
661
661
  export interface GridPrivateMethods<D = any> {
662
+ /**
663
+ * 内部方法
664
+ * @private
665
+ */
662
666
  callSlot<T = any>(slotFunc: NormalizedScopedSlot | ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
667
+ /**
668
+ * 内部方法
669
+ * @private
670
+ */
663
671
  extendTableMethods<T>(methodKeys: T[]): any
672
+ /**
673
+ * 内部方法
674
+ * @private
675
+ */
664
676
  triggerToolbarCommitEvent(params: VxeToolbarPropTypes.ButtonConfig | VxeToolbarPropTypes.ToolConfig, evnt: Event): Promise<any>
677
+ /**
678
+ * 内部方法
679
+ * @private
680
+ */
665
681
  triggerToolbarBtnEvent(button: VxeToolbarPropTypes.ButtonConfig, evnt: Event): void
682
+ /**
683
+ * 内部方法
684
+ * @private
685
+ */
666
686
  triggerToolbarTolEvent(button: VxeToolbarPropTypes.ToolConfig, evnt: Event): void
687
+ /**
688
+ * 内部方法
689
+ * @private
690
+ */
667
691
  triggerZoomEvent(evnt: Event): void
692
+ /**
693
+ * 内部方法
694
+ * @private
695
+ */
696
+ getParentElem(): HTMLElement | null
697
+ /**
698
+ * 内部方法
699
+ * @private
700
+ */
668
701
  getParentHeight(): number
702
+ /**
703
+ * 内部方法
704
+ * @private
705
+ */
669
706
  getExcludeHeight(): number
670
707
  }
671
708
  export interface VxeGridPrivateMethods<D = any> extends GridPrivateMethods<D> { }
@@ -41,7 +41,13 @@ export interface VxeLayoutAsideProps {
41
41
  padding?: VxeLayoutAsidePropTypes.Padding
42
42
  size?: VxeLayoutAsidePropTypes.Size
43
43
  collapseConfig?: VxeLayoutAsidePropTypes.CollapseConfig
44
+ /**
45
+ * 使用虚拟滚动条
46
+ */
44
47
  useScrollbar?: VxeLayoutAsidePropTypes.UseScrollbar
48
+ /**
49
+ * 滚动条配置项
50
+ */
45
51
  scrollbarConfig?: VxeLayoutAsidePropTypes.ScrollbarConfig
46
52
  }
47
53
 
@@ -33,7 +33,13 @@ export interface VxeLayoutBodyProps {
33
33
  padding?: VxeLayoutBodyPropTypes.Padding
34
34
  showBacktop?: VxeLayoutBodyPropTypes.ShowBacktop
35
35
  backtopConfig?: VxeLayoutBodyPropTypes.BacktopConfig
36
+ /**
37
+ * 使用虚拟滚动条
38
+ */
36
39
  useScrollbar?: VxeLayoutBodyPropTypes.UseScrollbar
40
+ /**
41
+ * 滚动条配置项
42
+ */
37
43
  scrollbarConfig?: VxeLayoutBodyPropTypes.ScrollbarConfig
38
44
  }
39
45
 
@@ -103,7 +103,13 @@ export interface VxeMenuProps {
103
103
  expandKeys?: VxeMenuPropTypes.ExpandKeys
104
104
  options?: VxeMenuPropTypes.Options
105
105
  menuConfig?: VxeMenuPropTypes.MenuConfig
106
+ /**
107
+ * 使用虚拟滚动条
108
+ */
106
109
  useScrollbar?: VxeMenuPropTypes.UseScrollbar
110
+ /**
111
+ * 滚动条配置项
112
+ */
107
113
  scrollbarConfig?: VxeMenuPropTypes.ScrollbarConfig
108
114
  /**
109
115
  * 挂载到指定元素下
@@ -16,13 +16,15 @@ export interface RowPrivateRef {
16
16
  export interface VxeRowPrivateRef extends RowPrivateRef { }
17
17
 
18
18
  export namespace VxeRowPropTypes {
19
+ export type GridLayout = boolean
19
20
  export type Gutter = string | number | (string | number)[]
20
21
  export type Wrap = boolean
21
22
  export type Vertical = boolean
22
23
  export type Size = VxeComponentSizeType
23
24
  }
24
25
 
25
- export interface VxeRowProps {
26
+ export type VxeRowProps = {
27
+ gridLayout?: VxeRowPropTypes.GridLayout
26
28
  gutter?: VxeRowPropTypes.Gutter
27
29
  wrap?: VxeRowPropTypes.Wrap
28
30
  vertical?: VxeRowPropTypes.Vertical
@@ -3,7 +3,7 @@ import { NormalizedScopedSlot } from 'vue/types/vnode'
3
3
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeGlobalConfig, VxeComponentStyleType, VxeComponentSlotType, VxeGlobalRendererOptions } from '@vxe-ui/core'
4
4
  import { VxeColumnPropTypes, VxeColumnProps, VxeColumnSlotTypes } from './column'
5
5
  import { VxeTableExtendCellAreaDefines, VxeTableExtendCellAreaEmits } from './table-plugins'
6
- import { VxeGridConstructor } from './grid'
6
+ import { VxeGridConstructor, VxeGridPrivateMethods } from './grid'
7
7
  import { VxeTooltipPropTypes } from './tooltip'
8
8
  import { VxeModalConstructor, VxeModalPrivateMethods, VxeModalPropTypes } from './modal'
9
9
  import { VxeDrawerPropTypes } from './drawer'
@@ -30,7 +30,7 @@ export type VxeTableInstance<D = any> = DefineVxeComponentInstance<{
30
30
  */
31
31
  internalData: TableInternalData<D>
32
32
  $xeParentTable: (VxeTableConstructor<D> & VxeTablePrivateMethods) | null | undefined
33
- $xeGrid: VxeGridConstructor<D> | null | undefined
33
+ $xeGrid: (VxeGridConstructor<D> & VxeGridPrivateMethods)| null | undefined
34
34
  $xeGantt: VxeTableDefines.InjectGanttType | null | undefined
35
35
  $xeTabs: (VxeTabsConstructor & VxeTabsPrivateMethods) | null
36
36
  $xeModal: (VxeModalConstructor & VxeModalPrivateMethods) | null
@@ -5530,12 +5530,11 @@ export interface TablePrivateMethods<D = any> {
5530
5530
  * @private
5531
5531
  */
5532
5532
  callSlot<T>(slotFunc: NormalizedScopedSlot | ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
5533
-
5534
5533
  /**
5535
5534
  * 内部方法
5536
5535
  * @private
5537
5536
  */
5538
- getParentElem(): Element | null
5537
+ getParentElem(): HTMLElement | null
5539
5538
  /**
5540
5539
  * 内部方法
5541
5540
  * @private