網站首頁 編程語言 正文
- 第一種方式: 使用 :default-expand-all=“isExpand”
優點:方便,簡單,頁面初始化的時候給 delfault-expand-all 賦值展開或關閉
缺點:不能手動操作
<el-table
:data="titleShineData.dataList"
class="table-reset"
size="small"
:default-expand-all="isExpand"
>
export default {
name: 'titleShineManage',
data () {
return {
isExpand: true
}
}
}
- 使用 :expand-row-keys=“expands”
優點: 可以任意打開 el-table 展開行
缺點: 麻煩
<el-table
:data="titleShineData.dataList"
class="table-reset"
size="small"
:expand-row-keys="expands"
>
<!-- 在展開行上 添加 type="expand" -->
<el-table-column prop="name" label type="expand">
</el-table-column>
</el-table>
export default {
name: 'titleShineManage',
data () {
return {
expands: []
}
},
methods:{
/ 查詢
onSearch () {
getFileTitleMapInfoList(this.queryForm).then(res => {
this.titleShineData = res.data
// 關閉所有的展開行,給expands 設置成空值
this.expands = []
})
},
}
}
原文鏈接:https://blog.csdn.net/qq_35257117/article/details/97906637
相關推薦
- 2023-07-16 uniapp 小程序 filters 過濾日期
- 2022-06-01 docker安裝nginx并配置ssl的方法步驟_docker
- 2022-11-05 判斷?ScrollView?List?是否正在滾動詳解_Swift
- 2022-12-21 Android?O對后臺Service限制詳解_Android
- 2022-07-21 linux環境下執行jar與終止
- 2022-07-14 python重復值處理得方法_python
- 2022-12-28 C++數據結構之哈希算法詳解_C 語言
- 2022-06-14 .NET?Core(.NET6)中gRPC使用實踐_實用技巧
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支