'代码格式化'

This commit is contained in:
dongsuo 2017-07-17 18:00:28 +08:00 committed by 花裤衩
parent 5069a4d1df
commit cbc5c18291
2 changed files with 102 additions and 106 deletions

View File

@ -10,8 +10,9 @@
</div>
</transition>
</template>
<script>
export default {
export default {
name: 'BackToTop',
props: {
visibilityHeight: {
@ -30,7 +31,7 @@ export default {
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '40px',
'line-height': '45px',
background: '#e7eaf1'
}
},
@ -38,7 +39,6 @@ export default {
type: String,
default: 'fade'
}
},
data() {
return {
@ -78,34 +78,33 @@ export default {
return -c / 2 * (--t * (t - 2) - 1) + b;
}
}
}
}
</script>
<style scoped>
.back-to-top {
.back-to-top {
position: fixed;
display: inline-block;
text-align: center;
cursor: pointer;
}
}
.back-to-top:hover {
.back-to-top:hover {
background: #d5dbe7;
}
}
.fade-enter-active,
.fade-leave-active {
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
}
.fade-enter,
.fade-leave-to {
.fade-enter,
.fade-leave-to {
opacity: 0
}
}
.back-to-top .Icon {
.back-to-top .Icon {
fill: #9aaabf;
background: none;
}
}
</style>

View File

@ -1,8 +1,7 @@
<template>
<div class="components-container">
<code>页面滚动到指定位置会在右下角出现返回顶部按钮</code>
<code>可自定义按钮的样式show/hide临界点返回的位置
如需文字提示可在外部使用Element的el-tooltip元素 </code>
<code>可自定义按钮的样式show/hide临界点返回的位置 如需文字提示可在外部使用Element的el-tooltip元素 </code>
<div>我是占位</div>
<div>我是占位</div>
<div>我是占位</div>
@ -134,9 +133,10 @@
</el-tooltip>
</div>
</template>
<script>
import BackToTop from 'components/BackToTop';
export default {
import BackToTop from 'components/BackToTop';
export default {
components: { BackToTop },
data() {
return {
@ -146,13 +146,10 @@ export default {
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '40px', //
'line-height': '45px', //
background: '#e7eaf1'//
}
}
}
}
</script>
<style scoped>
</style>
}
</script>