vue 實(shí)現(xiàn)超長文本截取,懸浮框提示
vue 超長文本截取,懸浮框提示
樣式:
<style>
.overflow-table .ivu-table-cell{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
table:
<Table border :columns="comDataColunms" :data="comDataList" :loading="tableDataLoading" class="overflow-table table-context"></Table>
主要代碼:
{
title: '統(tǒng)一信用代碼',
key: 'ucCode',
render: (h, params) => {
return h('span', {
domProps: {
title: params.row.ucCode
}
}, params.row.ucCode)
}
}
補(bǔ)充知識:前端使用ElementUI +Vue table表頭添加tooltip懸浮提示框
廢話不多說,看代碼~
<el-table empty-text=“正在加載中…” :data=“contentList” style=“width: 100%” @sort-change=“sort” class=“pro-table-item” tooltip-effect=“dark”
<template v-for="(item,index) in titleList"> <el-table-column v-if="index == '0'" :prop="index.toString()" :label="item" sortable="custom" min-width="120" :render-header="renderHeader" > </el-table-column> <el-table-column v-else :prop="index.toString()" :label="item" min-width="120" :render-header="renderHeader" show-overflow-tooltip
renderHeader(h, { column }) {
if(column.label.length>13) {
return (
{column.label}
)
} else {
return (
{column.label}
)
}
},
并不想讓所有的表頭都彈出tooltip,只想讓超出長度并且
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
以上這篇vue 實(shí)現(xiàn)超長文本截取,懸浮框提示就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
- vue實(shí)現(xiàn)移動端懸浮窗效果
- vue懸浮可拖拽懸浮按鈕的實(shí)例代碼
- vue中element-ui表格縮略圖懸浮放大功能的實(shí)例代碼
- Vue在頁面右上角實(shí)現(xiàn)可懸浮/隱藏的系統(tǒng)菜單
- Vue實(shí)現(xiàn)鼠標(biāo)經(jīng)過文字顯示懸浮框效果的示例代碼
- Vue.js鼠標(biāo)懸浮更換圖片功能
- vue+jquery+lodash實(shí)現(xiàn)滑動時頂部懸浮固定效果
- Vue實(shí)現(xiàn)PC端靠邊懸浮球的代碼
- vue實(shí)現(xiàn)可移動的懸浮按鈕
- vue實(shí)現(xiàn)懸浮球效果
相關(guān)文章
vue管理系統(tǒng)項(xiàng)目中的一些核心技能匯總
Vue是當(dāng)今增長最快的前端框架,Vue 平易近人、用途廣泛且性能卓越,它的語法非常直觀,并且具有友好的學(xué)習(xí)曲線,是開發(fā)人員最想學(xué)習(xí)的頂級前端庫之一,下面這篇文章主要給大家介紹了關(guān)于vue管理系統(tǒng)項(xiàng)目中的一些核心技能,需要的朋友可以參考下2022-05-05
vue之帶參數(shù)跳轉(zhuǎn)打開新頁面、新窗口
這篇文章主要介紹了vue之帶參數(shù)跳轉(zhuǎn)打開新頁面、新窗口方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-04-04
在vue中實(shí)現(xiàn)點(diǎn)擊選擇框阻止彈出層消失的方法
今天小編就為大家分享一篇在vue中實(shí)現(xiàn)點(diǎn)擊選擇框阻止彈出層消失的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-09-09

