From b8dc7f4526b39dd1a58720eb1812e8f6e82c6a0d Mon Sep 17 00:00:00 2001
From: buvta <12312540+buvta@users.noreply.github.com>
Date: Fri, 11 Dec 2020 23:42:28 +0800
Subject: [PATCH] =?UTF-8?q?film=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=88=86?=
=?UTF-8?q?=E5=89=B2=E7=BA=BF=E6=B7=BB=E5=8A=A0"=E5=9B=9E=E5=88=B0?=
=?UTF-8?q?=E9=A1=B6=E9=83=A8"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Film.vue | 11 +++++++++++
1 file changed, 11 insertions(+)
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) {