fix: disable highlight function in mobile

This commit is contained in:
niubility000 2024-03-16 11:48:00 +08:00 committed by GitHub
parent 39e27a6be9
commit e6dd31ba41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -395,8 +395,8 @@ export default {
// Fill and fit the window with listing items // Fill and fit the window with listing items
this.fillWindow(true); this.fillWindow(true);
if (window.sessionStorage.getItem(this.$route.path)) { if (window.sessionStorage.getItem(this.$route.path)) {
this.addSelected(JSON.parse(window.sessionStorage.getItem(this.$route.path))[1]);
document.documentElement.scrollTop = JSON.parse(window.sessionStorage.getItem(this.$route.path))[0]; document.documentElement.scrollTop = JSON.parse(window.sessionStorage.getItem(this.$route.path))[0];
if(!this.isMobile) this.addSelected(JSON.parse(window.sessionStorage.getItem(this.$route.path))[1]);
window.sessionStorage.removeItem(this.$route.path); window.sessionStorage.removeItem(this.$route.path);
} }
}); });