Explorar el Código

fix(SCRM-4787): 还原 上一次页面的滚动记录

john hace 1 año
padre
commit
2645fdad2f

+ 3 - 0
src/pages/parkingFee/mixins/parkingReceipt/parkingReceipt.js

@@ -90,6 +90,9 @@ export default {
     }),
   },
   created() {
+    if(window?.history?.scrollRestoration) {
+      window.history.scrollRestoration = 'manual';
+    }
     // 埋点本地化
     this.preUrl = uni.getStorageSync('previousUrl');
     this.$store.dispatch('invoice/init')

+ 3 - 0
src/pages/parkingFeeV2/mixins/parkingReceipt/parkingReceipt.js

@@ -90,6 +90,9 @@ export default {
     }),
   },
   created() {
+    if(window.history?.scrollRestoration) {
+      window.history.scrollRestoration = 'manual';
+    }
     // 埋点本地化
     this.preUrl = uni.getStorageSync('previousUrl');
     this.$store.dispatch('invoice/init')