项目初始化
This commit is contained in:
89
components/custom-back-to-top/custom-back-to-top.vue
Normal file
89
components/custom-back-to-top/custom-back-to-top.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<!-- z-paging自定义的点击返回顶部view -->
|
||||
<template>
|
||||
<view class="back-to-top">
|
||||
<view class="container">
|
||||
<u-icon name="fanhuidingbu" color="#555666" size="50" custom-prefix="iconfont"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 当前加载了几页
|
||||
current: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
// 一共有多少页可以加载
|
||||
total: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 0 返回返回顶部图片 1显示current/total
|
||||
type: 0,
|
||||
// 当前定时器
|
||||
timeout: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.back-to-top {
|
||||
/* 这里请设置100%填充满返回顶部按钮 */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
box-shadow: 0 0 20rpx #cccccc;
|
||||
background-color: white;
|
||||
|
||||
}
|
||||
|
||||
.container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
.count-text {
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 55rpx;
|
||||
height: 1rpx;
|
||||
background-color: #dedede;
|
||||
}
|
||||
|
||||
.back-img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user