add srollTop

This commit is contained in:
RainSun 2020-03-02 19:05:25 +08:00
parent f8f9077941
commit fbc3491105

View File

@ -4,7 +4,7 @@
<md-app-toolbar class="md-primary">
<div class="md-toolbar-section-start">
<md-button class="md-icon-button" @click="menuVisible = !menuVisible"><md-icon>menu</md-icon></md-button>
<span class="md-title">{{ lang.title }}</span>
<span class="md-title" @click="scrollTop()">{{ lang.title }}</span>
</div>
<div class="md-toolbar-section-end">
<md-button class="md-icon-button" @click="turnToSearch()"><md-icon>search</md-icon></md-button>
@ -343,6 +343,15 @@ export default {
// apk
downloadApk() {
window.open('https://ccb.canary.moe/download/Canary.apk');
},
//
scrollTop() {
console.log(1)
this.$refs.list_placeholder.parentNode.parentNode.scrollTo({
top: 0,
behavior: "smooth"
});
}
},
created() {