mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2024-12-31 19:17:44 +01:00
refs #441 Add scroll top button in tag
This commit is contained in:
parent
66979e1156
commit
fff15da061
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user