From 374a5c2c05436991981bce61446ae43088a5c856 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 7 Dec 2024 14:32:59 +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 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 680cfdd8e..8d2b6fa35 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',