From 1aa973d300e9dc47377029df35031c81b031f755 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 7 Dec 2024 14:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E5=AE=BD=E6=8B=96=E5=8A=A8=E9=95=BF?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=87=AA=E9=80=82=E5=BA=94=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/demo/table/resizable.html | 11 ++++++++++- .../main/java/com/ruoyi/common/annotation/Excel.java | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/resizable.html b/ruoyi-admin/src/main/resources/templates/demo/table/resizable.html index 680cfdd8..8d2b6fa3 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/table/resizable.html +++ b/ruoyi-admin/src/main/resources/templates/demo/table/resizable.html @@ -38,7 +38,16 @@ }, { field : 'userName', - title : '用户姓名' + title : '用户姓名', + cellStyle: function (value, row, index) { + return { css: { "min-width": "100px", "white-space": "nowrap", "text-overflow": "ellipsis", "overflow": "hidden", "max-width": "200px" } } + }, + formatter: function(value, row, index) { + if (index == 0) { + value = value + ",测试用户姓名,这是一条长文本,可以通过拖拽自适应内容显示。。。。"; + } + return $.table.tooltip(value, 30, "open"); + } }, { field : 'userPhone', diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java index 5e0d3d92..cfb5f9c9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java @@ -83,7 +83,7 @@ public @interface Excel */ public String prompt() default ""; - /** + /** * 是否允许内容换行 */ public boolean wrapText() default false;