uview-plus 3.3.15 → 3.3.17
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/changelog.md +12 -0
- package/components/u-grid/props.js +5 -0
- package/components/u-grid/u-grid.vue +1 -0
- package/components/u-navbar-mini/u-navbar-mini.vue +2 -10
- package/components/u-picker/u-picker.vue +6 -1
- package/components/u-swiper/u-swiper.vue +40 -38
- package/components/u-toolbar/u-toolbar.vue +32 -18
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 3.3.17(2024-08-12)
|
|
2
|
+
feat: swiper组件增加默认slot便于自定义
|
|
3
|
+
|
|
4
|
+
feat: grid新增间隔参数
|
|
5
|
+
|
|
6
|
+
feat: picker新增toolbar-right和toolbar-bottom插槽
|
|
7
|
+
|
|
8
|
+
## 3.3.16(2024-08-12)
|
|
9
|
+
fix: 解决swiper中title换行后多余的内容未被遮挡问题
|
|
10
|
+
|
|
11
|
+
fix: 修复迷你导航适配异形屏
|
|
12
|
+
|
|
1
13
|
## 3.3.15(2024-08-09)
|
|
2
14
|
fix: 修复默认单位设置为rpx时一些组件高度间距异常
|
|
3
15
|
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="u-navbar-mini" :class="[customClass]">
|
|
3
|
-
<view
|
|
4
|
-
class="u-navbar-mini__placeholder"
|
|
5
|
-
v-if="fixed"
|
|
6
|
-
:style="{
|
|
7
|
-
height: addUnit(getPx(height) + sys().statusBarHeight,'px'),
|
|
8
|
-
}"
|
|
9
|
-
></view>
|
|
10
3
|
<view class="u-navbar-mini__inner" :class="[fixed && 'u-navbar-mini--fixed']">
|
|
11
4
|
<u-status-bar
|
|
12
5
|
v-if="safeAreaInsetTop"
|
|
13
|
-
:bgColor="bgColor"
|
|
14
6
|
></u-status-bar>
|
|
15
7
|
<view
|
|
16
8
|
class="u-navbar-mini__content"
|
|
@@ -112,7 +104,6 @@
|
|
|
112
104
|
|
|
113
105
|
&__inner {
|
|
114
106
|
width: 180rpx;
|
|
115
|
-
border-radius: 20px;
|
|
116
107
|
overflow: hidden;
|
|
117
108
|
}
|
|
118
109
|
|
|
@@ -127,8 +118,9 @@
|
|
|
127
118
|
&__content {
|
|
128
119
|
@include flex(row);
|
|
129
120
|
padding: 0 15px;
|
|
121
|
+
border-radius: 20px;
|
|
130
122
|
align-items: center;
|
|
131
|
-
height:
|
|
123
|
+
height: 36px;
|
|
132
124
|
background-color: #9acafc;
|
|
133
125
|
position: relative;
|
|
134
126
|
justify-content: space-between;
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
:title="title"
|
|
23
23
|
@cancel="cancel"
|
|
24
24
|
@confirm="confirm"
|
|
25
|
-
|
|
25
|
+
>
|
|
26
|
+
<template #right>
|
|
27
|
+
<slot name="toolbar-right"></slot>
|
|
28
|
+
</template>
|
|
29
|
+
</u-toolbar>
|
|
30
|
+
<slot name="toolbar-bottom"></slot>
|
|
26
31
|
<picker-view
|
|
27
32
|
class="u-picker__view"
|
|
28
33
|
:indicatorStyle="`height: ${addUnit(itemHeight)}`"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
class="u-swiper__loading"
|
|
12
12
|
v-if="loading"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
14
|
+
<up-loading-icon mode="circle"></up-loading-icon>
|
|
15
15
|
</view>
|
|
16
16
|
<swiper
|
|
17
17
|
v-else
|
|
@@ -38,53 +38,55 @@
|
|
|
38
38
|
v-for="(item, index) in list"
|
|
39
39
|
:key="index"
|
|
40
40
|
>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
v-if="showTitle && testObject(item) && item.title && testImage(getSource(item))"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
41
|
+
<slot :item="item" :index="index">
|
|
42
|
+
<view
|
|
43
|
+
class="u-swiper__wrapper__item__wrapper"
|
|
44
|
+
:style="[itemStyle(index)]"
|
|
45
|
+
>
|
|
46
|
+
<!-- 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 -->
|
|
47
|
+
<image
|
|
48
|
+
class="u-swiper__wrapper__item__wrapper__image"
|
|
49
|
+
v-if="getItemType(item) === 'image'"
|
|
50
|
+
:src="getSource(item)"
|
|
51
|
+
:mode="imgMode"
|
|
52
|
+
@tap="clickHandler(index)"
|
|
53
|
+
:style="{
|
|
54
|
+
height: addUnit(height),
|
|
55
|
+
borderRadius: addUnit(radius)
|
|
56
|
+
}"
|
|
57
|
+
></image>
|
|
58
|
+
<video
|
|
59
|
+
class="u-swiper__wrapper__item__wrapper__video"
|
|
60
|
+
v-if="getItemType(item) === 'video'"
|
|
61
|
+
:id="`video-${index}`"
|
|
62
|
+
:enable-progress-gesture="false"
|
|
63
|
+
:src="getSource(item)"
|
|
64
|
+
:poster="getPoster(item)"
|
|
65
|
+
:title="showTitle && testObject(item) && item.title ? item.title : ''"
|
|
66
|
+
:style="{
|
|
67
|
+
height: addUnit(height)
|
|
68
|
+
}"
|
|
69
|
+
controls
|
|
70
|
+
@tap="clickHandler(index)"
|
|
71
|
+
></video>
|
|
72
|
+
<view v-if="showTitle && testObject(item) && item.title && testImage(getSource(item))"
|
|
73
|
+
class="u-swiper__wrapper__item__wrapper__title">
|
|
74
|
+
<text class="u-line-1">{{ item.title }}</text>
|
|
75
|
+
</view>
|
|
76
|
+
</view>
|
|
77
|
+
</slot>
|
|
76
78
|
</swiper-item>
|
|
77
79
|
</swiper>
|
|
78
80
|
<view class="u-swiper__indicator" :style="[addStyle(indicatorStyle)]">
|
|
79
81
|
<slot name="indicator">
|
|
80
|
-
<
|
|
82
|
+
<up-swiper-indicator
|
|
81
83
|
v-if="!loading && indicator && !showTitle"
|
|
82
84
|
:indicatorActiveColor="indicatorActiveColor"
|
|
83
85
|
:indicatorInactiveColor="indicatorInactiveColor"
|
|
84
86
|
:length="list.length"
|
|
85
87
|
:current="currentIndex"
|
|
86
88
|
:indicatorMode="indicatorMode"
|
|
87
|
-
></
|
|
89
|
+
></up-swiper-indicator>
|
|
88
90
|
</slot>
|
|
89
91
|
</view>
|
|
90
92
|
</view>
|
|
@@ -5,32 +5,42 @@
|
|
|
5
5
|
v-if="show"
|
|
6
6
|
>
|
|
7
7
|
<view
|
|
8
|
-
class="u-
|
|
9
|
-
hover-class="u-hover-class"
|
|
8
|
+
class="u-toolbar__left"
|
|
10
9
|
>
|
|
11
|
-
<
|
|
12
|
-
class="u-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
<view
|
|
11
|
+
class="u-toolbar__cancel__wrapper"
|
|
12
|
+
hover-class="u-hover-class"
|
|
13
|
+
>
|
|
14
|
+
<text
|
|
15
|
+
class="u-toolbar__wrapper__cancel"
|
|
16
|
+
@tap="cancel"
|
|
17
|
+
:style="{
|
|
18
|
+
color: cancelColor
|
|
19
|
+
}"
|
|
20
|
+
>{{ cancelText }}</text>
|
|
21
|
+
</view>
|
|
18
22
|
</view>
|
|
19
23
|
<text
|
|
20
24
|
class="u-toolbar__title u-line-1"
|
|
21
25
|
v-if="title"
|
|
22
26
|
>{{ title }}</text>
|
|
23
27
|
<view
|
|
24
|
-
class="u-
|
|
25
|
-
hover-class="u-hover-class"
|
|
28
|
+
class="u-toolbar__right"
|
|
26
29
|
>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<slot name="right">
|
|
31
|
+
<view
|
|
32
|
+
class="u-toolbar__confirm__wrapper"
|
|
33
|
+
hover-class="u-hover-class"
|
|
34
|
+
>
|
|
35
|
+
<text
|
|
36
|
+
class="u-toolbar__wrapper__confirm"
|
|
37
|
+
@tap="confirm"
|
|
38
|
+
:style="{
|
|
39
|
+
color: confirmColor
|
|
40
|
+
}"
|
|
41
|
+
>{{ confirmText }}</text>
|
|
42
|
+
</view>
|
|
43
|
+
</slot>
|
|
34
44
|
</view>
|
|
35
45
|
</view>
|
|
36
46
|
</template>
|
|
@@ -95,6 +105,10 @@
|
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
&__wrapper {
|
|
108
|
+
&__left,
|
|
109
|
+
&__right {
|
|
110
|
+
@include flex;
|
|
111
|
+
}
|
|
98
112
|
&__confirm {
|
|
99
113
|
color: $u-primary;
|
|
100
114
|
font-size: 15px;
|