網站首頁 編程語言 正文
二次開發element組件 el-tooltip+span 超出文本部分顯示省略號鼠標懸浮顯示全部內容
EllipsisTooltip.vue(我是放置在了src/components)
{{ text }}
css
//el-tooltip二次封裝
.tooltip-wrap {
height: 16px; // 必須要有高度設置,因為tooltip的顯示條件是通過高度來判斷的
display: inline-block;
display: -webkit-box;
-webkit-line-clamp: 1; // 因為通過高度所以只顯示一行,溢出顯示省略號
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;//英文數字折行
span{
line-height: 1.3;//這個行高看自定義樣式文本高度
}
}
頁面調用
原文鏈接:https://blog.csdn.net/weixin_41628411/article/details/107057506
相關推薦
- 2023-11-12 python enumerate函數用法
- 2023-11-26 StringBuffer 和 StringBuilder
- 2022-12-03 Android開發數據結構算法ArrayList源碼詳解_Android
- 2022-04-09 增強一個類功能三個方法
- 2022-04-21 C#使用Chart繪制曲線_C#教程
- 2022-07-12 修改docker官方鏡像內部內容并重新build鏡像
- 2022-08-18 Go?Web編程添加服務器錯誤和訪問日志_Golang
- 2022-09-13 C++?static詳解,類中的static用法說明_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同步修改后的遠程分支