Home  >  Q&A  >  body text

javascript - How to retain the value of check after table page turning when using vue.js element ui?

Bold text

I select some data on the first page, and I may select some on the second page, but I may refresh it again on the second page. Suppose I store the data on this page, if I return to the second page How to render my previous data on one page? What if he chooses how many pieces of data to display on each page? Is there anyone who knows the answer?

阿神阿神2645 days ago1626

reply all(1)I'll reply

  • 三叔

    三叔2017-06-28 09:28:49

    Don’t you have paging? You should read it from the background once when switching the number of pages. If you want to retain some checked status, you can save the ID of the row of data with vuex. If you are afraid that the cached data will be refreshed when the page is refreshed, After brushing it off, you can save it in locastorage and switch the page later to match the two sets

    reply
    0
  • Cancelreply