You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to implement minimal router / page changes. I tried to use a component page with a dynamic $template to switch between templates based on a value in PetiteVue.reactivity, but looks like that not work?
$template: `#view-${route.template}`
Route is reactive and works fine inside of a template if updated / page changed, but Template isn't changed in (mounted) component.
Also tried to use sub-component with parameter and hoped component would be updated if parameter changes
Idea was if current changes the component would be refreshed.
Is there a way to use such a central component "page" with sub-componente or dynamically updated $template?
Alternative way would be just to use v-if to build a switch / case for each possible site, but would like a more generic way without a stupid list of all possible pages / components.
Also a v-for would be better to loop all sub-components with a v-if for visibility of current page component...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Coming from that discussion about minimal router: #83 (reply in thread)
I try to implement minimal router / page changes. I tried to use a component
page
with a dynamic$template
to switch between templates based on a value in PetiteVue.reactivity, but looks like that not work?Route is reactive and works fine inside of a template if updated / page changed, but Template isn't changed in (mounted) component.
Also tried to use sub-component with parameter and hoped component would be updated if parameter changes
Idea was if
current
changes the component would be refreshed.Is there a way to use such a central component "page" with sub-componente or dynamically updated
$template
?Alternative way would be just to use
v-if
to build a switch / case for each possible site, but would like a more generic way without a stupid list of all possible pages / components.Also a v-for would be better to loop all sub-components with a v-if for visibility of current page component...
Any idea how it could work?
Beta Was this translation helpful? Give feedback.
All reactions