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 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
 
@@ -16,6 +16,11 @@ export const props = defineMixin({
16
16
  align: {
17
17
  type: String,
18
18
  default: () => defProps.grid.align
19
+ },
20
+ // 间隔
21
+ gap: {
22
+ type: String,
23
+ default: '0px'
19
24
  }
20
25
  }
21
26
  })
@@ -107,6 +107,7 @@
107
107
  // 这里使用grid布局使用为目前20240409uni-app在抖音小程序开启virtualHost时有bug,存在事件失效问题。
108
108
  /* #ifndef APP-NVUE */
109
109
  display: grid;
110
+ grid-gap: v-bind(gap);
110
111
  grid-template-columns: repeat(v-bind(col), 1fr);
111
112
  /* #endif */
112
113
  }
@@ -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: 44px;
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
- ></u-toolbar>
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
- <u-loading-icon mode="circle"></u-loading-icon>
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
- <view
42
- class="u-swiper__wrapper__item__wrapper"
43
- :style="[itemStyle(index)]"
44
- >
45
- <!-- 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 -->
46
- <image
47
- class="u-swiper__wrapper__item__wrapper__image"
48
- v-if="getItemType(item) === 'image'"
49
- :src="getSource(item)"
50
- :mode="imgMode"
51
- @tap="clickHandler(index)"
52
- :style="{
53
- height: addUnit(height),
54
- borderRadius: addUnit(radius)
55
- }"
56
- ></image>
57
- <video
58
- class="u-swiper__wrapper__item__wrapper__video"
59
- v-if="getItemType(item) === 'video'"
60
- :id="`video-${index}`"
61
- :enable-progress-gesture="false"
62
- :src="getSource(item)"
63
- :poster="getPoster(item)"
64
- :title="showTitle && testObject(item) && item.title ? item.title : ''"
65
- :style="{
66
- height: addUnit(height)
67
- }"
68
- controls
69
- @tap="clickHandler(index)"
70
- ></video>
71
- <text
72
- v-if="showTitle && testObject(item) && item.title && testImage(getSource(item))"
73
- class="u-swiper__wrapper__item__wrapper__title u-line-1"
74
- >{{ item.title }}</text>
75
- </view>
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
- <u-swiper-indicator
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
- ></u-swiper-indicator>
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-toolbar__cancel__wrapper"
9
- hover-class="u-hover-class"
8
+ class="u-toolbar__left"
10
9
  >
11
- <text
12
- class="u-toolbar__wrapper__cancel"
13
- @tap="cancel"
14
- :style="{
15
- color: cancelColor
16
- }"
17
- >{{ cancelText }}</text>
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-toolbar__confirm__wrapper"
25
- hover-class="u-hover-class"
28
+ class="u-toolbar__right"
26
29
  >
27
- <text
28
- class="u-toolbar__wrapper__confirm"
29
- @tap="confirm"
30
- :style="{
31
- color: confirmColor
32
- }"
33
- >{{ confirmText }}</text>
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;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "uview-plus3.0重磅发布,全面的Vue3移动组件库。",
5
- "version": "3.3.15",
5
+ "version": "3.3.17",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",