Element checkbox display problem

clipboard.png
expected result:
Select a Zhang Wenchang, below tabs display Zhang Wenchang"s information
Select Zhang Li, below tabs display Zhang Li"s information
can be multi-selected
if not selected, the corresponding tabs is hidden

my idea: the name in
checkbox is cycled out according to the data in the background, and there is a personId in the returned data
when checkbox is selected, the corresponding personId will appear in the checkList bound by v-model

            <el-checkbox-group v-model="checkList">
            <el-checkbox
            v-for="(item,index) in familyName" :key="index" v-if="index!=0"
            :label="item.personId"
            @change="handleCheckedCitiesChange"
            >{{item.name}}</el-checkbox>
             </el-checkbox-group>

< el-tabs type= "card" class= "employee-family" v show = "familyShow" v show = "(item, index) in checkList": key= "item.name" >

      <el-tab-pane label=""
        v-for="(item, index) in familyTab"
        :label="item.planName"
        :key="item.name"
        :name="item.PlanName"
      >

I want to find out whether the personId in the familyName exists according to the personId in checkList
if it exists, let the tabs appear, otherwise the tabs hides

Aug.20,2021

actually, your checkList can just save personId , then define a computed attribute, then Filter the required data according to checkList , and then use tab to iterate


have you solved this problem?

Menu