当前位置:网站首页>如何展开Collapse 的所有折叠面板
如何展开Collapse 的所有折叠面板
2022-07-04 05:29:00 【_处女座程序员的日常】
方法:折叠面板默认展开值是activeNames,只需遍历所有的el-collapse-iteme,将其name值插入到
activeNames中即可。
<template>
<div>
<el-collapse v-model="activeNames">
<div v-for="(item,index) in moduleFiles">
<el-collapse-item :title="item.totle" :name="index">
<div>{
{
item.content}}</div>
</el-collapse-item>
</div>
</el-collapse>
</div>
</template>
data() {
return {
moduleFiles:[
{
title:"好好学习",content:"读书不仅仅是为了强大自我,而且是为了中华之崛起"},
{
title:"好好学习",content:"读书不仅仅是为了强大自我,而且是为了中华之崛起"},
{
title:"好好学习",content:"读书不仅仅是为了强大自我,而且是为了中华之崛起"},
{
title:"好好学习",content:"读书不仅仅是为了强大自我,而且是为了中华之崛起"},
],
activeNames:[],
}
},
mounted(){
const open =[];
for(let i=0;i<this.moduleFiles.length;i++){
open.push(i);
}
this.activeNames = open;
}
结果如下:
边栏推荐
- LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
- 企业级日志分析系统ELK(如果事与愿违那一定另有安排)
- [matlab] general function of communication signal modulation bandpass filter
- One click filtering to select Baidu online disk files
- What is MQ?
- C语言简易学生管理系统(含源码)
- Graduation design of small programs -- small programs of food and recipes
- 2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
- Introduction to AMBA
- Analysis of classical pointer and array written test questions in C language
猜你喜欢
How to configure static IP for Kali virtual machine
VB. Net simple processing pictures, black and white (class library - 7)
Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)
What is MQ?
Topological sorting and graphical display of critical path
Flutter calls Gaode map app to realize location search, route planning and reverse geocoding
[technology development -25]: integration technology of radio and television network, Internet, telecommunication network and power grid
ansys命令
PostgreSQL has officially surpassed mysql. Is this guy too strong!
724. 寻找数组的中心下标
随机推荐
What are the reasons for the frequent high CPU of ECS?
十二. golang其他
[QT] create mycombobox click event
基于单片机的太阳能杀虫系统
Unity2D--人物移动并转身
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
flink1.13 sql基础语法(二)join操作
BUU-Crypto-[HDCTF2019]basic rsa
Risc-v-qemu-virt in FreeRTOS_ Lock mechanism analysis of GCC
Zzulioj:1201: mode problem
VB. Net GIF (making and disassembling - optimizing code, class library - 5)
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
Build an Internet of things infrared temperature measuring punch in machine with esp32 / rush to work after the Spring Festival? Baa, no matter how hard you work, you must take your temperature first
2022 t elevator repair operation certificate examination question bank and simulation examination
Analysis of classical pointer and array written test questions in C language
[untitled]
总线的基本概念
Thinkphp6.0 middleware with limited access frequency think throttle
What is MQ?
Unity2d -- character moves and turns