On the keep-alive problem of vue

scenario:
there are An and B pages

  • keep-alive setting: include= "A", only A pages are cached
  • A page has c components
  • when An is loaded for the first time, manually jump to the B page and return
  • then the problem occurs, even the mounted of the c component of page A will be triggered
  • what"s even weirder is that after jumping from A to B, the mounted of component c will be triggered again?

the above situation is keep-alive setting:
all page setup keep-alive will not appear until include selectively caches A page.
my guess:
keep-alive will only cache A page, but will not cache the c component of A page, that is, the sub-component of A page?
solve?

Menu