[Vuejs]-How to let user choose how many checkboxes can be selected in Element-ui?

0👍

Hi you can make a list of question and use a v-for

<template>

    <el-checkbox-group 
       v-model="questionCheck"
        :min="1"
        :max="3">
     <el-checkbox v-for="(question,key) in questions" :label="question" :key="key"> 
           {{question}}
     </el-checkbox>
</el-checkbox-group>   
 </template>
 <script>
  export default {
    data() {
      return {
      questionCheck: ['question one', 'question two'],
      questions: ['question one', 'question two','question tree']
    };
    }
};
</script>

Leave a comment