1
This commit is contained in:
23
uview-plus/components/u-avatar-group/avatarGroup.js
Normal file
23
uview-plus/components/u-avatar-group/avatarGroup.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 16:49:55
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/avatarGroup.js
|
||||
*/
|
||||
export default {
|
||||
// avatarGroup 组件
|
||||
avatarGroup: {
|
||||
urls: [],
|
||||
maxCount: 5,
|
||||
shape: 'circle',
|
||||
mode: 'scaleToFill',
|
||||
showMore: true,
|
||||
size: 40,
|
||||
keyName: '',
|
||||
gap: 0.5,
|
||||
extraValue: 0
|
||||
}
|
||||
}
|
||||
54
uview-plus/components/u-avatar-group/props.js
Normal file
54
uview-plus/components/u-avatar-group/props.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 头像图片组
|
||||
urls: {
|
||||
type: Array,
|
||||
default: () => defProps.avatarGroup.urls
|
||||
},
|
||||
// 最多展示的头像数量
|
||||
maxCount: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.avatarGroup.maxCount
|
||||
},
|
||||
// 头像形状
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => defProps.avatarGroup.shape
|
||||
},
|
||||
// 图片裁剪模式
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => defProps.avatarGroup.mode
|
||||
},
|
||||
// 超出maxCount时是否显示查看更多的提示
|
||||
showMore: {
|
||||
type: Boolean,
|
||||
default: () => defProps.avatarGroup.showMore
|
||||
},
|
||||
// 头像大小
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.avatarGroup.size
|
||||
},
|
||||
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
||||
keyName: {
|
||||
type: String,
|
||||
default: () => defProps.avatarGroup.keyName
|
||||
},
|
||||
// 头像之间的遮挡比例
|
||||
gap: {
|
||||
type: [String, Number],
|
||||
validator(value) {
|
||||
return value >= 0 && value <= 1
|
||||
},
|
||||
default: () => defProps.avatarGroup.gap
|
||||
},
|
||||
// 需额外显示的值
|
||||
extraValue: {
|
||||
type: [Number, String],
|
||||
default: () => defProps.avatarGroup.extraValue
|
||||
}
|
||||
}
|
||||
})
|
||||
110
uview-plus/components/u-avatar-group/u-avatar-group.vue
Normal file
110
uview-plus/components/u-avatar-group/u-avatar-group.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user