search

Home  >  Q&A  >  body text

javascript - How does vue2.0 save the status of iframe when routing jumps?


The tab tab at the top is set by routing jump. For example, I enter some words in the Baidu input box, and then I click the right tab, and the routing jump is , finally, when I click on the nested iframe Baidu tab, the status cannot be saved. . Is there any good solution?

我想大声告诉你我想大声告诉你2737 days ago612

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-18 10:54:49

    I don’t know if you want to save the information of the input box. You can use vuex to save the value of the input box, and read the value into the input box when you return to the current page.
    You can try it out

    <keep-alive>
          <router-view></router-view>
    </keep-alive>

    After switching the route and then switching back again, the original instance that was not released should be used, and the state should be saved.

    reply
    0
  • Cancelreply