1
This commit is contained in:
61
uview-plus/components/u-skeleton/props.js
Normal file
61
uview-plus/components/u-skeleton/props.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 是否展示骨架组件
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: () => defProps.skeleton.loading
|
||||
},
|
||||
// 是否开启动画效果
|
||||
animate: {
|
||||
type: Boolean,
|
||||
default: () => defProps.skeleton.animate
|
||||
},
|
||||
// 段落占位图行数
|
||||
rows: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.skeleton.rows
|
||||
},
|
||||
// 段落占位图的宽度
|
||||
rowsWidth: {
|
||||
type: [String, Number, Array],
|
||||
default: () => defProps.skeleton.rowsWidth
|
||||
},
|
||||
// 段落占位图的高度
|
||||
rowsHeight: {
|
||||
type: [String, Number, Array],
|
||||
default: () => defProps.skeleton.rowsHeight
|
||||
},
|
||||
// 是否展示标题占位图
|
||||
title: {
|
||||
type: Boolean,
|
||||
default: () => defProps.skeleton.title
|
||||
},
|
||||
// 段落标题的宽度
|
||||
titleWidth: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.skeleton.titleWidth
|
||||
},
|
||||
// 段落标题的高度
|
||||
titleHeight: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.skeleton.titleHeight
|
||||
},
|
||||
// 是否展示头像占位图
|
||||
avatar: {
|
||||
type: Boolean,
|
||||
default: () => defProps.skeleton.avatar
|
||||
},
|
||||
// 头像占位图大小
|
||||
avatarSize: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.skeleton.avatarSize
|
||||
},
|
||||
// 头像占位图的形状,circle-圆形,square-方形
|
||||
avatarShape: {
|
||||
type: String,
|
||||
default: () => defProps.skeleton.avatarShape
|
||||
}
|
||||
}
|
||||
})
|
||||
25
uview-plus/components/u-skeleton/skeleton.js
Normal file
25
uview-plus/components/u-skeleton/skeleton.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:20:14
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js
|
||||
*/
|
||||
export default {
|
||||
// skeleton
|
||||
skeleton: {
|
||||
loading: true,
|
||||
animate: true,
|
||||
rows: 0,
|
||||
rowsWidth: '100%',
|
||||
rowsHeight: 18,
|
||||
title: true,
|
||||
titleWidth: '50%',
|
||||
titleHeight: 18,
|
||||
avatar: false,
|
||||
avatarSize: 32,
|
||||
avatarShape: 'circle'
|
||||
}
|
||||
}
|
||||
249
uview-plus/components/u-skeleton/u-skeleton.vue
Normal file
249
uview-plus/components/u-skeleton/u-skeleton.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user