After entering the home page, jump to the new page via the vue route, and then after clicking the home page to return, the js code of the home page is not executed.

JS Code

window.$("document").ready(() => {
// 
  const windowHeight = document.documentElement.clientHeight
  const menuListHeight = windowHeight - 80 + "px"
  const contentListHeight = windowHeight - 101 + "px"
  window.$(".workbenchdiv1").css("height", menuListHeight)
  window.$(".workbenchdiv2").css("height", contentListHeight)
  // 
  window.$(".have-list ul:nth-child(1)").on("click", function () {
    window.$(this).siblings().slideToggle()
  })
  // 
  window.$(".no-list").on("click", function () {
  })
})

Mar.07,2021
The

ready event, which enters the page for the first time, triggers when the document is loaded. And then it won't be triggered again.
if you want to execute this code every time you enter the front page, that is, execute this code every time you enter the route, just OK it in the mounted hook function.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31579-2bd92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31579-2bd92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?