7
7
700Hp2021-12-28 00:42:02
JavaScript
700Hp, 2021-12-28 00:42:02

How to overwrite component inside keep-alive?

There is a component wrapped in keep-alive.
By clicking on the button, I want to completely overwrite it, clear all fields, without reloading the page.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sinneren, 2021-12-28
@700Hp

well, I don't know about keep-alive, but I'm guessing something like
this.somestate=false;
this.$nextTick(() => this.somestate = true)
and on the component v-if=somestate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question