uview-plus 3.3.5 → 3.3.6

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,13 @@
1
+ ## 3.3.6(2024-07-23)
2
+ feat: u-album组件添加radius,shape参数,定义参考当前u-image参数
3
+
4
+ fix: 修复了calendar组件title和日期title未垂直居中的问题
5
+
6
+ fix: update:modelValue缺失emit定义
7
+
8
+ ## 3.3.5(2024-07-10)
9
+ picker组件支持hasInput模式
10
+
1
11
  ## 3.3.4(2024-07-07)
2
12
  fix: input组件双向绑定问题 #419
3
13
 
@@ -56,6 +56,16 @@ export const props = defineMixin({
56
56
  showMore: {
57
57
  type: Boolean,
58
58
  default: () => defProps.album.showMore
59
+ },
60
+ // 图片形状,circle-圆形,square-方形
61
+ shape: {
62
+ type: String,
63
+ default: () => defProps.image.shape
64
+ },
65
+ // 圆角,单位任意
66
+ radius: {
67
+ type: [String, Number],
68
+ default: () => defProps.image.radius
59
69
  }
60
70
  }
61
71
  })
@@ -26,7 +26,8 @@
26
26
  :style="[
27
27
  {
28
28
  width: imageWidth,
29
- height: imageHeight
29
+ height: imageHeight,
30
+ borderRadius: shape == 'circle' ? '10000px' : addUnit(radius)
30
31
  }
31
32
  ]"
32
33
  ></image>
@@ -38,6 +39,9 @@
38
39
  index1 === showUrls[showUrls.length - 1].length - 1
39
40
  "
40
41
  class="u-album__row__wrapper__text"
42
+ :style="{
43
+ borderRadius: shape == 'circle' ? '50%' : addUnit(radius),
44
+ }"
41
45
  >
42
46
  <up-text
43
47
  :text="`+${urls.length - maxCount}`"
@@ -79,7 +83,8 @@ const dom = uni.requireNativePlugin('dom')
79
83
  * @property {Boolean} previewFullImage 是否可以预览图片 (默认 true )
80
84
  * @property {String | Number} rowCount 每行展示图片数量,如设置,singleSize和multipleSize将会无效 (默认 3 )
81
85
  * @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true )
82
- *
86
+ * @property {String} shape 图片形状,circle-圆形,square-方形 (默认 'square' )
87
+ * @property {String | Number} radius 圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
83
88
  * @event {Function} albumWidth 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width )
84
89
  * @example <u-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></u-album>
85
90
  */
@@ -173,6 +178,7 @@ export default {
173
178
  }
174
179
  },
175
180
  methods: {
181
+ addUnit,
176
182
  // 预览图片
177
183
  onPreviewTap(url) {
178
184
  const urls = this.urls.map((item) => {
@@ -261,4 +267,4 @@ export default {
261
267
  }
262
268
  }
263
269
  }
264
- </style>
270
+ </style>
@@ -65,6 +65,8 @@
65
65
  @import "../../libs/css/components.scss";
66
66
 
67
67
  .u-calendar-header {
68
+ display: flex;
69
+ flex-direction: column;
68
70
  padding-bottom: 4px;
69
71
 
70
72
  &__title {
@@ -468,6 +468,7 @@
468
468
  .u-calendar-month {
469
469
 
470
470
  &__title {
471
+ display: flex;
471
472
  font-size: 14px;
472
473
  line-height: 42px;
473
474
  height: 42px;
@@ -125,7 +125,7 @@ export default {
125
125
  }
126
126
  },
127
127
  },
128
- emits: ['close', 'cancel', 'confirm', 'change'],
128
+ emits: ['close', 'cancel', 'confirm', 'change', 'update:modelValue'],
129
129
  computed: {
130
130
  inputLabel() {
131
131
  let items = this.innerColumns.map((item, index) => item[this.innerIndex[index]])
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.5",
5
+ "version": "3.3.6",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",
@@ -59,6 +59,16 @@ declare interface AlbumProps {
59
59
  * @param width 宽度
60
60
  */
61
61
  onAlbumWidth?: (width: any) => any
62
+ /**
63
+ * 图片形状
64
+ * @default "square"
65
+ */
66
+ shape?: 'circle' | 'square'
67
+ /**
68
+ * 圆角,默认单位px
69
+ * @default 0
70
+ */
71
+ radius?: string | number
62
72
  }
63
73
 
64
74
  declare interface _Album {