1
This commit is contained in:
27
uview-plus/components/u-back-top/backtop.js
Normal file
27
uview-plus/components/u-back-top/backtop.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 16:50:18
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/backtop.js
|
||||
*/
|
||||
export default {
|
||||
// backtop组件
|
||||
backtop: {
|
||||
mode: 'circle',
|
||||
icon: 'arrow-upward',
|
||||
text: '',
|
||||
duration: 100,
|
||||
scrollTop: 0,
|
||||
top: 400,
|
||||
bottom: 100,
|
||||
right: 20,
|
||||
zIndex: 9,
|
||||
iconStyle: {
|
||||
color: '#909399',
|
||||
fontSize: '19px'
|
||||
}
|
||||
}
|
||||
}
|
||||
56
uview-plus/components/u-back-top/props.js
Normal file
56
uview-plus/components/u-back-top/props.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 返回顶部的形状,circle-圆形,square-方形
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => defProps.backtop.mode
|
||||
},
|
||||
// 自定义图标
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => defProps.backtop.icon
|
||||
},
|
||||
// 提示文字
|
||||
text: {
|
||||
type: String,
|
||||
default: () => defProps.backtop.text
|
||||
},
|
||||
// 返回顶部滚动时间
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.duration
|
||||
},
|
||||
// 滚动距离
|
||||
scrollTop: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.scrollTop
|
||||
},
|
||||
// 距离顶部多少距离显示,单位px
|
||||
top: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.top
|
||||
},
|
||||
// 返回顶部按钮到底部的距离,单位px
|
||||
bottom: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.bottom
|
||||
},
|
||||
// 返回顶部按钮到右边的距离,单位px
|
||||
right: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.right
|
||||
},
|
||||
// 层级
|
||||
zIndex: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.backtop.zIndex
|
||||
},
|
||||
// 图标的样式,对象形式
|
||||
iconStyle: {
|
||||
type: Object,
|
||||
default: () => defProps.backtop.iconStyle
|
||||
}
|
||||
}
|
||||
})
|
||||
133
uview-plus/components/u-back-top/u-back-top.vue
Normal file
133
uview-plus/components/u-back-top/u-back-top.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user