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 +10 -0
- package/components/u-album/props.js +10 -0
- package/components/u-album/u-album.vue +9 -3
- package/components/u-calendar/header.vue +2 -0
- package/components/u-calendar/month.vue +1 -0
- package/components/u-picker/u-picker.vue +1 -1
- package/package.json +1 -1
- package/types/comps/album.d.ts +10 -0
package/changelog.md
CHANGED
|
@@ -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>
|
|
@@ -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
package/types/comps/album.d.ts
CHANGED
|
@@ -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 {
|