I'm trying to do a conditional tag ending, but this isn't working. Is there a work around?
<div class="container">
<template v-if="smallScreen">
</div>
</template>
<template v-else>
</div>
</template>
Thanks! William
答案 0 :(得分:2)
I can understand why you require this kind of situation. But alas, there's no such a way to fulfill this situation to be solved as of now with Vue.js.
You must coverage them with a wrapper:
<div class="container" v-if="smallScreen">
<template></template>
</div>
<div class="container" v-else>
<template>Another Template</template>
</div>