Skip to content

Commit

Permalink
Go to introduce section when open the detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
MouJieQin committed Nov 19, 2024
1 parent a38d9af commit e4b178a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spa/src/views/VideoDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,17 @@ export default {
this.webpPath = res.webpPath
this.videoInfo = res.videoInfo
},
goToIntroduce() {
document.getElementById("introduction").scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'nearest' })
}
},
async created() {
await this.webSocketManager()
await this.loadInfo()
// await this.loadJson()
await this.loadElements()
document.title = this.videoInfo.title
this.goToIntroduce()
},
async beforeUnmount() {
this.isBeforeUnmount = true
Expand Down

0 comments on commit e4b178a

Please sign in to comment.