vxe-pc-ui 3.19.5 → 3.19.7
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.
- package/es/icon/style.css +1 -1
- package/es/layout-aside/style.css +4 -1
- package/es/layout-aside/style.min.css +1 -1
- package/es/layout-body/style.css +4 -1
- package/es/layout-body/style.min.css +1 -1
- package/es/row/src/col.js +42 -17
- package/es/row/src/row.js +35 -15
- package/es/row/style.css +101 -24
- package/es/row/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +5 -1
- package/es/space/style.css +1 -0
- package/es/space/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/style.css +4 -0
- package/es/tabs/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-layout-aside/style.css +4 -1
- package/es/vxe-layout-aside/style.min.css +1 -1
- package/es/vxe-layout-body/style.css +4 -1
- package/es/vxe-layout-body/style.min.css +1 -1
- package/es/vxe-row/style.css +101 -24
- package/es/vxe-row/style.min.css +1 -1
- package/es/vxe-space/style.css +1 -0
- package/es/vxe-space/style.min.css +1 -1
- package/es/vxe-tabs/style.css +4 -0
- package/es/vxe-tabs/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +95 -38
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/style/style.css +4 -1
- package/lib/layout-aside/style/style.min.css +1 -1
- package/lib/layout-body/style/style.css +4 -1
- package/lib/layout-body/style/style.min.css +1 -1
- package/lib/row/src/col.js +47 -20
- package/lib/row/src/col.min.js +1 -1
- package/lib/row/src/row.js +41 -16
- package/lib/row/src/row.min.js +1 -1
- package/lib/row/style/style.css +101 -24
- package/lib/row/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +5 -0
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/space/style/style.css +1 -0
- package/lib/space/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/style/style.css +4 -0
- package/lib/tabs/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-layout-aside/style/style.css +4 -1
- package/lib/vxe-layout-aside/style/style.min.css +1 -1
- package/lib/vxe-layout-body/style/style.css +4 -1
- package/lib/vxe-layout-body/style/style.min.css +1 -1
- package/lib/vxe-row/style/style.css +101 -24
- package/lib/vxe-row/style/style.min.css +1 -1
- package/lib/vxe-space/style/style.css +1 -0
- package/lib/vxe-space/style/style.min.css +1 -1
- package/lib/vxe-tabs/style/style.css +4 -0
- package/lib/vxe-tabs/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/row/src/col.ts +44 -17
- package/packages/row/src/row.ts +37 -16
- package/packages/scrollbar/src/scrollbar.ts +5 -1
- package/styles/components/layout-aside.scss +10 -1
- package/styles/components/layout-body.scss +10 -1
- package/styles/components/row.scss +21 -3
- package/styles/components/space.scss +1 -0
- package/styles/components/tabs.scss +4 -0
- package/types/components/row.d.ts +3 -1
- /package/es/icon/{iconfont.1791695426253.ttf → iconfont.1791794439953.ttf} +0 -0
- /package/es/icon/{iconfont.1791695426253.woff → iconfont.1791794439953.woff} +0 -0
- /package/es/icon/{iconfont.1791695426253.woff2 → iconfont.1791794439953.woff2} +0 -0
- /package/es/{iconfont.1791695426253.ttf → iconfont.1791794439953.ttf} +0 -0
- /package/es/{iconfont.1791695426253.woff → iconfont.1791794439953.woff} +0 -0
- /package/es/{iconfont.1791695426253.woff2 → iconfont.1791794439953.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791695426253.ttf → iconfont.1791794439953.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791695426253.woff → iconfont.1791794439953.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791695426253.woff2 → iconfont.1791794439953.woff2} +0 -0
- /package/lib/{iconfont.1791695426253.ttf → iconfont.1791794439953.ttf} +0 -0
- /package/lib/{iconfont.1791695426253.woff → iconfont.1791794439953.woff} +0 -0
- /package/lib/{iconfont.1791695426253.woff2 → iconfont.1791794439953.woff2} +0 -0
package/packages/row/src/col.ts
CHANGED
|
@@ -3,9 +3,12 @@ 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 { ColReactData, VxeColPropTypes, VxeColEmits, VxeRowConstructor, VxeRowPrivateMethods, VxeComponentSizeType, ValueOf } from '../../../types'
|
|
8
9
|
|
|
10
|
+
const { errLog } = createComponentLog('col')
|
|
11
|
+
|
|
9
12
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
10
13
|
name: 'VxeCol',
|
|
11
14
|
mixins: [
|
|
@@ -61,31 +64,38 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
61
64
|
computeColStyle () {
|
|
62
65
|
const $xeCol = this
|
|
63
66
|
const props = $xeCol
|
|
67
|
+
const $xeRow = $xeCol.$xeRow
|
|
64
68
|
|
|
65
69
|
const { width } = props
|
|
66
70
|
const rowGutter = $xeCol.computeRowGutter
|
|
67
71
|
const rowVertical = $xeCol.computeRowVertical
|
|
72
|
+
let gridLayout = false
|
|
73
|
+
if ($xeRow) {
|
|
74
|
+
gridLayout = !!$xeRow.gridLayout
|
|
75
|
+
}
|
|
68
76
|
const style: Record<string, string | number> = {}
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if (!gridLayout) {
|
|
78
|
+
if (rowGutter) {
|
|
79
|
+
let [lrGutter, tbGutter] = XEUtils.isArray(rowGutter) ? rowGutter : [rowGutter]
|
|
80
|
+
if (rowVertical) {
|
|
81
|
+
tbGutter = lrGutter
|
|
82
|
+
lrGutter = ''
|
|
83
|
+
}
|
|
84
|
+
if (lrGutter) {
|
|
85
|
+
const padding = XEUtils.isNumber(lrGutter) ? toCssUnit(lrGutter / 2) : `calc(${toCssUnit(lrGutter)} / 2)`
|
|
86
|
+
style.paddingLeft = padding
|
|
87
|
+
style.paddingRight = padding
|
|
88
|
+
}
|
|
89
|
+
if (tbGutter) {
|
|
90
|
+
const padding = XEUtils.isNumber(tbGutter) ? toCssUnit(tbGutter / 2) : `calc(${toCssUnit(tbGutter)} / 2)`
|
|
91
|
+
style.paddingTop = padding
|
|
92
|
+
style.paddingBottom = padding
|
|
93
|
+
}
|
|
79
94
|
}
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
style.paddingTop = padding
|
|
83
|
-
style.paddingBottom = padding
|
|
95
|
+
if (width) {
|
|
96
|
+
style.width = toCssUnit(width)
|
|
84
97
|
}
|
|
85
98
|
}
|
|
86
|
-
if (width) {
|
|
87
|
-
style.width = toCssUnit(width)
|
|
88
|
-
}
|
|
89
99
|
return style
|
|
90
100
|
}
|
|
91
101
|
},
|
|
@@ -124,6 +134,23 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
124
134
|
])
|
|
125
135
|
}
|
|
126
136
|
},
|
|
137
|
+
mounted () {
|
|
138
|
+
const $xeCol = this
|
|
139
|
+
const props = $xeCol
|
|
140
|
+
const $xeRow = $xeCol.$xeRow
|
|
141
|
+
|
|
142
|
+
const { width, fill } = props
|
|
143
|
+
if ($xeRow) {
|
|
144
|
+
if ($xeRow.gridLayout) {
|
|
145
|
+
if (width) {
|
|
146
|
+
errLog('vxe.error.notSupportProp', ['grid-layout', `width=${width}`, 'width=null'])
|
|
147
|
+
}
|
|
148
|
+
if (fill) {
|
|
149
|
+
errLog('vxe.error.notSupportProp', ['grid-layout', `fill=${fill}`, 'fill=false'])
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
127
154
|
render (this: any, h) {
|
|
128
155
|
return this.renderVN(h)
|
|
129
156
|
}
|
package/packages/row/src/row.ts
CHANGED
|
@@ -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 (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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 {
|
|
@@ -693,6 +693,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
$xeScrollbar.reFlag++
|
|
696
|
+
globalEvents.on($xeScrollbar, 'resize', () => {
|
|
697
|
+
$xeScrollbar.reFlag++
|
|
698
|
+
})
|
|
696
699
|
},
|
|
697
700
|
beforeDestroy () {
|
|
698
701
|
const $xeScrollbar = this
|
|
@@ -702,6 +705,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
702
705
|
if (resizeObserver) {
|
|
703
706
|
resizeObserver.disconnect()
|
|
704
707
|
}
|
|
708
|
+
globalEvents.off($xeScrollbar, 'resize')
|
|
705
709
|
},
|
|
706
710
|
destroyed () {
|
|
707
711
|
const $xeScrollbar = this
|
|
@@ -12,7 +12,16 @@
|
|
|
12
12
|
width: var(--vxe-ui-layout-aside-collapse-width);
|
|
13
13
|
}
|
|
14
14
|
&.is--padding {
|
|
15
|
-
|
|
15
|
+
& > .vxe-layout-aside--inner {
|
|
16
|
+
padding: var(--vxe-ui-layout-padding-default);
|
|
17
|
+
}
|
|
18
|
+
& > .vxe-layout-aside--scrollbar{
|
|
19
|
+
& > .vxe-layout-aside--scrollbar-view {
|
|
20
|
+
& > .vxe-layout-aside--scrollbar-inner {
|
|
21
|
+
padding: var(--vxe-ui-layout-padding-default);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
16
25
|
}
|
|
17
26
|
}
|
|
18
27
|
|
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
flex-grow: 1;
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
&.is--padding {
|
|
8
|
-
|
|
8
|
+
& > .vxe-layout-body--inner {
|
|
9
|
+
padding: var(--vxe-ui-layout-padding-double);
|
|
10
|
+
}
|
|
11
|
+
& > .vxe-layout-body--scrollbar {
|
|
12
|
+
& > .vxe-layout-body--scrollbar-view {
|
|
13
|
+
& > .vxe-layout-body--scrollbar-inner {
|
|
14
|
+
padding: var(--vxe-ui-layout-padding-double);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
9
18
|
}
|
|
10
19
|
}
|
|
11
20
|
.vxe-layout-body--inner {
|
|
@@ -36,9 +36,27 @@
|
|
|
36
36
|
&.align--right {
|
|
37
37
|
text-align: right;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
}
|
|
@@ -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
|
|
26
|
+
export type VxeRowProps = {
|
|
27
|
+
gridLayout?: VxeRowPropTypes.GridLayout
|
|
26
28
|
gutter?: VxeRowPropTypes.Gutter
|
|
27
29
|
wrap?: VxeRowPropTypes.Wrap
|
|
28
30
|
vertical?: VxeRowPropTypes.Vertical
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|