Elmentplus笔记

elementplus设置collapse默认展开

所要展开项的name标识符与v-model绑定值匹配即可默认展开。

代码片段:

<el-collapse v-model="activeNames">
     <el-collapse-item name="0" title='段落1'>1
        </el-collapse-item>
     <el-collapse-item name="1" title='段落2'>2
        </el-collapse-item>
     <el-collapse-item name="2" title='段落3'>3
        </el-collapse-item>
</el-collapse>
        
data(){
return{
  activeNames:['0','1','2']
}
}