Answer the question
In order to leave comments, you need to log in
Vue how to properly use v-for and v-if together?
There is a layout:
<template v-if="!model.isFreeTime">
<el-checkbox-group v-model="model.times">
<el-checkbox-button :label="item.value" :key="item.value" :disabled="item.disabled" v-if="this.model.selectedTime == item.extraDate">{{item.label}}</el-checkbox-button>
</el-checkbox-group>
</template>
Answer the question
In order to leave comments, you need to log in
As an option not to create a new html element
<template v-if="">
<div v-for="" />
</template>
correctly "make friends" v-for and v-if
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question