当前位置:网站首页>如何展开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;
}
结果如下:
边栏推荐
- Notepad++--显示相关的配置
- Upper computer software development - log information is stored in the database based on log4net
- 2022 t elevator repair operation certificate examination question bank and simulation examination
- VB.net 简单的处理图片,黑白(类库——7)
- LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
- Google Chrome browser will support the function of selecting text translation
- [matlab] communication signal modulation general function interpolation function
- [matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
- input显示当前选择的图片
- [technology development -25]: integration technology of radio and television network, Internet, telecommunication network and power grid
猜你喜欢

VB. Net simple processing pictures, black and white (class library - 7)

BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述

RSA加密应用常见缺陷的原理与实践

Signification des lettres du module optique et abréviation des paramètres Daquan

Daily question brushing record (12)

Simulink and Arduino serial port communication

VB.net 简单的处理图片,黑白(类库——7)

基于单片机的太阳能杀虫系统

Ping port artifact psping

Arc135 C (the proof is not very clear)
随机推荐
谷歌 Chrome 浏览器将支持选取文字翻译功能
Electronic components mall and data manual download website summary
Overview of relevant subclasses of beanfactorypostprocessor and beanpostprocessor
[matlab] communication signal modulation general function interpolation function
Character types of C language
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
Remote desktop client RDP
Flink1.13 basic SQL syntax (II) join operation
Descriptive analysis of data distribution characteristics (data exploration)
RSA加密应用常见缺陷的原理与实践
[interested reading] advantageous filtering modeling on long term user behavior sequences for click through rate pre
C # character similarity comparison general class
【QT】制作MyComboBox点击事件
Supplement the JS of a video website to decrypt the video
Yyds dry goods inventory TCP & UDP
Integer type of C language
With the advent of the IP era, how can E-sports hotels take advantage of the "east wind" of games?
[excel] PivotChart
光模塊字母含義及參數簡稱大全
Halcon图片标定,使得后续图片处理过后变成与模板图片一样