diff --git a/src/components/Film.vue b/src/components/Film.vue
index 7e22120..c27ad63 100644
--- a/src/components/Film.vue
+++ b/src/components/Film.vue
@@ -81,6 +81,7 @@
视图切换
{ showToolbar = !showToolbar; if (!showToolbar) this.refreshFilteredList() }'>{{ showToolbar ? '隐藏工具栏' : '显示工具栏' }}
+ 回到顶部
@@ -126,6 +127,7 @@
detailEvent(site, row)"
@@ -447,6 +449,15 @@ export default {
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE', 'SET_SETTING']),
+ backTop () {
+ const viewMode = this.showFind ? this.setting.searchViewMode : this.setting.view
+ if (viewMode === 'picture') {
+ document.getElementById('film-body').scrollTop = 0
+ } else {
+ const table = this.showFind ? this.$refs.searchResultTable : this.$refs.filmTable
+ table.bodyWrapper.scrollTop = 0
+ }
+ },
refreshFilteredList (popperVisible) {
if (popperVisible === true) return
if (!this.showToolbar) {