S
S
Sergey2019-11-07 09:58:28
Vue.js
Sergey, 2019-11-07 09:58:28

How to use keep-alive with vuikit tabs?

Directory on Vue, tabs from Vuikit are used , the contents of the last tab are user-generated - a list of favorites. With keep-alive, when a user adds a list item to their favorites, the item itself only appears when the page is refreshed. How can I make it show up right away? It is desirable not to change the finished application much.
Finished application
GitHub
demo

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-11-07
Primirenkov @sergeyprimirenkov

The isEmpty property, which controls the display of favorites, does not change its value when this list changes, but it should. Obviously, it should be made computable:

computed: {
  isEmpty() {
    return !this.$store.state.wishlistIds.length;
  },
  ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question