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',