From 1dcdda357b79fde24705e274818224c05d0a5587 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期四, 17 六月 2021 18:44:46 +0800 Subject: [PATCH] 超多列表名称改为功能展示列表:添加2行省略例子 --- src/pages/demo/list.vue | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/pages/demo/list.vue b/src/pages/demo/list.vue index 1e93e40..c97985f 100644 --- a/src/pages/demo/list.vue +++ b/src/pages/demo/list.vue @@ -40,9 +40,31 @@ <el-table :data="list" max-height="500px" stripe> <el-table-column type="index" label="搴忓彿" align="center" width="60" /> + <el-table-column label="澶村儚" prop="headImg" align="center" min-width="100"> + <template slot-scope="scope"> + <el-image :src="scope.row.headImg" style="width:50px;height:50px;" fit="contain" :preview-src-list="[scope.row.headImg]"> + <div slot="error" class="image-slot"> + <svg-icon icon-class="avatar" style="width:50px;height:50px;" /> + </div> + </el-image> + </template> + </el-table-column> <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> - <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> + <el-table-column label="涓撳寤鸿" prop="adviceInfo" align="center" min-width="160"> + <template slot-scope="scope"> + <el-popover + placement="top-start" + width="400" + popper-class="el-popover_tableFilter" + trigger="hover" + :popper-options="{ removeOnDestroy: true }" + > + <div style="max-height: 500px;overflow-y: auto;">{{ scope.row.adviceInfo }}</div> + <div slot="reference" class="line-clamp-2" style="line-height: 1.2">{{ scope.row.adviceInfo }}</div> + </el-popover> + </template> + </el-table-column> <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> <el-table-column label="瑙掕壊鍚嶇О" prop="name" align="center" min-width="120" /> @@ -194,7 +216,8 @@ id: 'xxx', index: 1, name: '瓒呯骇绠$悊鍛�', - createTime: '2020-08-09 10:10:10' + createTime: '2020-08-09 10:10:10', + adviceInfo: '鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟﹀暒鍟�' }], total: 100 } -- Gitblit v1.8.0