refs #441 Add scroll top button in tag

This commit is contained in:
AkiraFukushima 2018-07-19 22:02:19 +09:00
parent 66979e1156
commit fff15da061
1 changed files with 17 additions and 0 deletions

View File

@ -9,12 +9,17 @@
</div>
</transition-group>
<div class="loading-card" v-loading="lazyLoading" :element-loading-background="backgroundColor"></div>
<div class="upper" v-show="!heading">
<el-button type="primary" icon="el-icon-arrow-up" @click="upper" circle>
</el-button>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import Toot from '../Cards/Toot'
import scrollTop from '../../../utils/scroll'
export default {
name: 'tag',
@ -151,6 +156,12 @@ export default {
} finally {
this.$store.commit('TimelineSpace/changeLoading', false)
}
},
upper () {
scrollTop(
document.getElementById('scrollable'),
0
)
}
}
}
@ -178,5 +189,11 @@ export default {
.loading-card:empty {
height: 0;
}
.upper {
position: fixed;
bottom: 20px;
right: 20px;
}
</style>
<style src="@/assets/timeline-transition.scss"></style>