当前位置:网站首页>如何展开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;
}
结果如下:
边栏推荐
- Excel 比较日器
- The data mark is a piece of fat meat, and it is not only China Manfu technology that focuses on this meat
- PostgreSQL has officially surpassed mysql. Is this guy too strong!
- Programmers don't talk about morality, and use multithreading for Heisi's girlfriend
- flink1.13 sql基础语法(一)DDL、DML
- Letter meaning and parameter abbreviation of optical module Daquan
- tutle时钟改进版
- 2022g2 power station boiler stoker special operation certificate examination question bank and answers
- Notepad++ -- display related configurations
- 19.Frambuffer应用编程
猜你喜欢
C # character similarity comparison general class
BUU-Pwn-test_ your_ nc
ANSYS command
基于单片机的太阳能杀虫系统
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
VB.net 简单的处理图片,黑白(类库——7)
Input displays the currently selected picture
Evolution of system architecture: differences and connections between SOA and microservice architecture
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
RSA加密应用常见缺陷的原理与实践
随机推荐
Overview of relevant subclasses of beanfactorypostprocessor and beanpostprocessor
光模塊字母含義及參數簡稱大全
Flink1.13 SQL basic syntax (I) DDL, DML
Canoe panel learning video
ping端口神器psping
2022G2电站锅炉司炉特种作业证考试题库及答案
SQL performance optimization skills
2022年R2移动式压力容器充装复训题库及答案
Online shrimp music will be closed in January next year. Netizens call No
[paper summary] zero shot semantic segmentation
[QT] timer
Flask
【兴趣阅读】Adversarial Filtering Modeling on Long-term User Behavior Sequences for Click-Through Rate Pre
What are the reasons for the frequent high CPU of ECS?
Wechat applet +php realizes authorized login
c语言经典指针和数组笔试题解析
KMP match string
空洞卷积、可变形卷积、可变形ROI Pooling
Principle and practice of common defects in RSA encryption application
Just do it with your hands 7 - * project construction details 2 - hook configuration