Closed
Description
Demo: https://play.nativescript.org/?template=play-vue&id=liGhQ2
<Page>
<StackLayout>
<Button @tap="counter++">{{counter}}</Button>
<keep-alive>
<CompButton v-if="isOdd" key="odd" label="Odd"></CompButton>
<CompButton v-else key="even" label="Even"></CompButton>
</keep-alive>
</StackLayout>
</Page>
<CompButton>
is just a simple wrapper of <Button>
. This template is almost everything of the app (except a definition of data counter
).
The counter
starts from 0
. When counter <= 2
everything goes fine. But after that, no <CompButton>
will be rendered in the view. Everything else functions well, and no <CompButton>
is destroyed (means the keep-alive
is working).
If replace the custom component with a bare <Button>
, no more issues.
Metadata
Metadata
Assignees
Labels
No labels