網站首頁 編程語言 正文
- 第一種方式: 使用 :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
相關推薦
- 2022-10-27 樹莓派4B更換清華源和沒有公鑰報錯
- 2022-08-23 React?Native中實現動態導入的示例代碼_React
- 2022-11-09 python進行數據合并concat/merge_python
- 2023-11-21 功率和能量換算公式、如何換算,W和J如何轉換,power和energy轉換
- 2023-01-28 GoLang?nil與interface的空指針深入分析_Golang
- 2022-05-11 在 Markdown 中,如何在反引號對語句中使用反引號
- 2022-07-16 python中文文本切詞Kmeans聚類_python
- 2022-12-06 詳解從ObjectPool到CAS指令_C#教程
- 最近更新
-
- 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同步修改后的遠程分支