vxe-pc-ui 4.17.20 → 4.17.21
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/dist/all.esm.js +202 -87
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/slider/src/slider.js +167 -72
- package/es/slider/style.css +8 -15
- package/es/slider/style.min.css +1 -1
- package/es/space/src/space.js +31 -11
- 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/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-slider/style.css +8 -15
- package/es/vxe-slider/style.min.css +1 -1
- package/es/vxe-space/style.css +1 -0
- package/es/vxe-space/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 +210 -92
- package/lib/index.umd.min.js +1 -1
- package/lib/slider/src/slider.js +170 -78
- package/lib/slider/src/slider.min.js +1 -1
- package/lib/slider/style/style.css +8 -15
- package/lib/slider/style/style.min.css +1 -1
- package/lib/space/src/space.js +36 -11
- package/lib/space/src/space.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/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-slider/style/style.css +8 -15
- package/lib/vxe-slider/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/package.json +4 -3
- package/packages/slider/src/slider.ts +165 -72
- package/packages/space/src/space.ts +37 -12
- package/styles/components/slider.scss +8 -13
- package/styles/components/space.scss +1 -0
- package/types/components/slider.d.ts +9 -2
- package/types/components/space.d.ts +2 -0
- /package/es/icon/{iconfont.1787911536008.ttf → iconfont.1787994747472.ttf} +0 -0
- /package/es/icon/{iconfont.1787911536008.woff → iconfont.1787994747472.woff} +0 -0
- /package/es/icon/{iconfont.1787911536008.woff2 → iconfont.1787994747472.woff2} +0 -0
- /package/es/{iconfont.1787911536008.ttf → iconfont.1787994747472.ttf} +0 -0
- /package/es/{iconfont.1787911536008.woff → iconfont.1787994747472.woff} +0 -0
- /package/es/{iconfont.1787911536008.woff2 → iconfont.1787994747472.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1787911536008.ttf → iconfont.1787994747472.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1787911536008.woff → iconfont.1787994747472.woff} +0 -0
- /package/lib/icon/style/{iconfont.1787911536008.woff2 → iconfont.1787994747472.woff2} +0 -0
- /package/lib/{iconfont.1787911536008.ttf → iconfont.1787994747472.ttf} +0 -0
- /package/lib/{iconfont.1787911536008.woff → iconfont.1787994747472.woff} +0 -0
- /package/lib/{iconfont.1787911536008.woff2 → iconfont.1787994747472.woff2} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, h, PropType, computed, reactive } from 'vue'
|
|
1
|
+
import { ref, h, PropType, computed, reactive, VNode } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, createEvent, useSize } from '../../ui'
|
|
@@ -37,6 +37,10 @@ export default defineVxeComponent({
|
|
|
37
37
|
separator: {
|
|
38
38
|
type: String as PropType<VxeSpacePropTypes.Separator>,
|
|
39
39
|
default: () => getConfig().space.separator
|
|
40
|
+
},
|
|
41
|
+
align: {
|
|
42
|
+
type: String as PropType<VxeSpacePropTypes.Align>,
|
|
43
|
+
default: () => getConfig().space.align
|
|
40
44
|
}
|
|
41
45
|
},
|
|
42
46
|
emits: [] as VxeSpaceEmits,
|
|
@@ -58,7 +62,7 @@ export default defineVxeComponent({
|
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
const computeWrapperStyle = computed(() => {
|
|
61
|
-
const { gap } = props
|
|
65
|
+
const { align, gap } = props
|
|
62
66
|
const stys: VxeComponentStyleType = {}
|
|
63
67
|
let rowGap: string | number = ''
|
|
64
68
|
let columGap: string | number = ''
|
|
@@ -74,6 +78,9 @@ export default defineVxeComponent({
|
|
|
74
78
|
columGap = gap.columGap || ''
|
|
75
79
|
}
|
|
76
80
|
}
|
|
81
|
+
if (align) {
|
|
82
|
+
stys['align-items'] = align
|
|
83
|
+
}
|
|
77
84
|
if (!eqEmptyValue(rowGap)) {
|
|
78
85
|
stys['--vxe-ui-space-current-row-gap'] = toCssUnit(rowGap)
|
|
79
86
|
}
|
|
@@ -109,11 +116,36 @@ export default defineVxeComponent({
|
|
|
109
116
|
|
|
110
117
|
Object.assign($xeSpace, spaceMethods, spacePrivateMethods)
|
|
111
118
|
|
|
119
|
+
const renderItems = () => {
|
|
120
|
+
const { separator, itemClassName } = props
|
|
121
|
+
const itemVNs: VNode[] = []
|
|
122
|
+
const defaultSlot = slots.default
|
|
123
|
+
const separatorSlot = slots.separator
|
|
124
|
+
if (defaultSlot) {
|
|
125
|
+
XEUtils.each(defaultSlot({}), (itemVN, index, items) => {
|
|
126
|
+
itemVNs.push(
|
|
127
|
+
h('div', {
|
|
128
|
+
key: 'i' + index,
|
|
129
|
+
class: ['vxe-space--item', getPropClass(itemClassName, { index })]
|
|
130
|
+
}, [itemVN])
|
|
131
|
+
)
|
|
132
|
+
if ((separator || separatorSlot) && index < items.length - 1) {
|
|
133
|
+
itemVNs.push(
|
|
134
|
+
h('div', {
|
|
135
|
+
key: 's' + index,
|
|
136
|
+
class: 'vxe-space--separator'
|
|
137
|
+
}, separatorSlot ? separatorSlot({}) : ('' + separator))
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
return itemVNs
|
|
143
|
+
}
|
|
144
|
+
|
|
112
145
|
const renderVN = () => {
|
|
113
|
-
const { vertical, wrap, className
|
|
146
|
+
const { vertical, wrap, className } = props
|
|
114
147
|
const wrapperStyle = computeWrapperStyle.value
|
|
115
148
|
const vSize = computeSize.value
|
|
116
|
-
const defaultSlot = slots.default
|
|
117
149
|
return h('div', {
|
|
118
150
|
ref: refElem,
|
|
119
151
|
class: ['vxe-space', getPropClass(className, {}), {
|
|
@@ -122,14 +154,7 @@ export default defineVxeComponent({
|
|
|
122
154
|
'is--vertical': vertical
|
|
123
155
|
}],
|
|
124
156
|
style: wrapperStyle
|
|
125
|
-
},
|
|
126
|
-
? (defaultSlot({}) || []).map((itemVN, index) => {
|
|
127
|
-
return h('div', {
|
|
128
|
-
key: index,
|
|
129
|
-
class: ['vxe-space--item', getPropClass(itemClassName, { index })]
|
|
130
|
-
}, [itemVN])
|
|
131
|
-
})
|
|
132
|
-
: [])
|
|
157
|
+
}, renderItems())
|
|
133
158
|
}
|
|
134
159
|
|
|
135
160
|
$xeSpace.renderVN = renderVN
|
|
@@ -50,7 +50,7 @@ $sliderThemeList: (
|
|
|
50
50
|
.vxe-slider {
|
|
51
51
|
position: relative;
|
|
52
52
|
display: block;
|
|
53
|
-
padding: 0.
|
|
53
|
+
padding: 0.8em;
|
|
54
54
|
@for $index from 0 to list.length($sliderThemeList) {
|
|
55
55
|
$item: list.nth($sliderThemeList, $index + 1);
|
|
56
56
|
&.theme--#{map.get($item, name)} {
|
|
@@ -80,10 +80,10 @@ $sliderThemeList: (
|
|
|
80
80
|
}
|
|
81
81
|
.vxe-slider--bar-btn {
|
|
82
82
|
&:hover {
|
|
83
|
-
transform: scale(1.2);
|
|
83
|
+
transform: translate(-50%, -50%) scale(1.2);
|
|
84
84
|
}
|
|
85
85
|
&:active {
|
|
86
|
-
transform: scale(1.1);
|
|
86
|
+
transform: translate(-50%, -50%) scale(1.1);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -122,19 +122,14 @@ $sliderThemeList: (
|
|
|
122
122
|
|
|
123
123
|
.vxe-slider--bar-btn {
|
|
124
124
|
position: absolute;
|
|
125
|
-
width:
|
|
126
|
-
height:
|
|
127
|
-
top:
|
|
125
|
+
width: 1.2em;
|
|
126
|
+
height: 1.2em;
|
|
127
|
+
top: 50%;
|
|
128
|
+
transform: translate(-50%, -50%);
|
|
128
129
|
border-radius: 50%;
|
|
129
|
-
border:
|
|
130
|
+
border: 2px solid var(--vxe-ui-font-primary-color);
|
|
130
131
|
background-color: #fff;
|
|
131
132
|
cursor: pointer;
|
|
132
133
|
z-index: 1;
|
|
133
134
|
@include baseMixin.createAnimationTransition(transform, 0.1s);
|
|
134
|
-
}
|
|
135
|
-
.vxe-slider--start-btn {
|
|
136
|
-
left: -0.45em;
|
|
137
|
-
}
|
|
138
|
-
.vxe-slider--end-btn {
|
|
139
|
-
right: -0.45em;
|
|
140
135
|
}
|
|
@@ -26,6 +26,8 @@ export interface VxeSliderPrivateRef extends SliderPrivateRef { }
|
|
|
26
26
|
export namespace VxeSliderPropTypes {
|
|
27
27
|
export type Size = VxeComponentSizeType
|
|
28
28
|
export type ModelValue = number | string | null | (number | string | null)[]
|
|
29
|
+
export type StartValue = number | string | null
|
|
30
|
+
export type EndValue = number | string | null
|
|
29
31
|
export type Max = number | string
|
|
30
32
|
export type Min = number | string
|
|
31
33
|
export type Vertical = boolean
|
|
@@ -40,6 +42,8 @@ export namespace VxeSliderPropTypes {
|
|
|
40
42
|
export interface VxeSliderProps {
|
|
41
43
|
size?: VxeSliderPropTypes.Size
|
|
42
44
|
modelValue?: VxeSliderPropTypes.ModelValue
|
|
45
|
+
startValue?: VxeSliderPropTypes.StartValue
|
|
46
|
+
endValue?: VxeSliderPropTypes.EndValue
|
|
43
47
|
max?: VxeSliderPropTypes.Max
|
|
44
48
|
min?: VxeSliderPropTypes.Min
|
|
45
49
|
vertical?: VxeSliderPropTypes.Vertical
|
|
@@ -56,11 +60,12 @@ export interface SliderPrivateComputed {
|
|
|
56
60
|
export interface VxeSliderPrivateComputed extends SliderPrivateComputed { }
|
|
57
61
|
|
|
58
62
|
export interface SliderReactData {
|
|
59
|
-
startValue: number
|
|
60
|
-
endValue: number
|
|
61
63
|
}
|
|
62
64
|
export interface SliderInternalData {
|
|
63
65
|
_isUp?: boolean
|
|
66
|
+
currValue: number
|
|
67
|
+
startValue: number
|
|
68
|
+
endValue: number
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
export interface SliderMethods {
|
|
@@ -72,6 +77,8 @@ export interface VxeSliderPrivateMethods extends SliderPrivateMethods { }
|
|
|
72
77
|
|
|
73
78
|
export type VxeSliderEmits = [
|
|
74
79
|
'update:modelValue',
|
|
80
|
+
'update:startValue',
|
|
81
|
+
'update:endValue',
|
|
75
82
|
'change',
|
|
76
83
|
'track-dragstart',
|
|
77
84
|
'track-dragover',
|
|
@@ -30,6 +30,7 @@ export namespace VxeSpacePropTypes {
|
|
|
30
30
|
export type ClassName = string
|
|
31
31
|
export type ItemClassName = string
|
|
32
32
|
export type Separator = string
|
|
33
|
+
export type Align = 'stretch' | 'start' | 'end' | 'center' | 'baseline' | '' | null
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export interface VxeSpaceProps {
|
|
@@ -52,6 +53,7 @@ export interface VxeSpaceProps {
|
|
|
52
53
|
* 分隔符
|
|
53
54
|
*/
|
|
54
55
|
separator?: VxeSpacePropTypes.Separator
|
|
56
|
+
align?: VxeSpacePropTypes.Align
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export interface SpacePrivateComputed {
|
|
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
|