When developing in vue, I encountered this scenario:
<v-dialog v-model="data_table.dialog">
I have a variable called is_mobile
that is observable. My goal is to modify the tag above based on the value of is_mobile
. For instance:
<v-dialog v-model="data_table.dialog">
should be displayed when is_mobile
is false. However, it should appear like this instead:
<v-dialog fullscreen hide-overlay transition="dialog-bottom-transition" v-model="data_table.dialog">
when is_mobile
is true.
How can I achieve this effect?
I am only familiar with setting attribute values, but in this case, I need to include or exclude attributes entirely depending on the condition. Also, for the transition, the attribute and value should either both be present or absent, as shown above, rather than using fullscreen="true"
/fullscreen="false"
.
Thank you