innerWidth is not used for v-if condition #10500
Unanswered
DevKame
asked this question in
Help/Questions
Replies: 1 comment
-
Because |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a nav menu that has two buttons for switching items. Those buttons consist of arrow icons provided by fontawesome.
over an innerWidth of 992, the nav is vertical, everything below that makes the na horizontal. So i need an arrow-up for everything over 992 and an arrow-left for below that. I managed to define that as follows:
And within the template it looks like this:
But no matter the display width, it keeps beeing the caret-up icon. What did i miss?
i also tried to have the innerWidth as a reactive value:
I also tried using a computed property directly for the icon:
with this template:
<fa-icon :icon="iconvalue"></fa-icon>
and then it works. but the icon doesnt chagnes dynamicly to changing screensize, i must reload for changes to apply.
Beta Was this translation helpful? Give feedback.
All reactions