From 7e615f6c8450e36f84ed5b38a258be1f38c5aab2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 10 Sep 2020 11:19:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BC=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=88=E9=80=9A=E8=BF=87=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E8=AE=BE=E7=BD=AE=E6=A0=87=E9=A2=98=E6=A0=B7?= =?UTF-8?q?=E5=BC=8FheaderStyle=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/controller/DemoTableController.java | 9 ++ .../main/resources/static/ruoyi/js/ry-ui.js | 1 + .../templates/demo/table/headerStyle.html | 91 +++++++++++++++++++ .../resources/templates/index-topnav.html | 1 + .../src/main/resources/templates/index.html | 1 + 5 files changed, 103 insertions(+) create mode 100644 ruoyi-admin/src/main/resources/templates/demo/table/headerStyle.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java index 3ca31e823..df62a22c0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java @@ -250,6 +250,15 @@ public class DemoTableController extends BaseController return prefix + "/print"; } + /** + * 表格标题格式化 + */ + @GetMapping("/headerStyle") + public String headerStyle() + { + return prefix + "/headerStyle"; + } + /** * 表格其他操作 */ diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 1debc74d7..35bae11e6 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -131,6 +131,7 @@ var table = { queryParams: options.queryParams, // 传递参数(*) rowStyle: options.rowStyle, // 通过自定义函数设置行样式 footerStyle: options.footerStyle, // 通过自定义函数设置页脚样式 + headerStyle: options.headerStyle, // 通过自定义函数设置标题样式 columns: options.columns, // 显示列信息(*) data: options.data, // 被加载的数据 responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数 diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/headerStyle.html b/ruoyi-admin/src/main/resources/templates/demo/table/headerStyle.html new file mode 100644 index 000000000..0c862c739 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/demo/table/headerStyle.html @@ -0,0 +1,91 @@ + + + + + + +
+
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html index cecd908a4..b93f6376a 100644 --- a/ruoyi-admin/src/main/resources/templates/index-topnav.html +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -129,6 +129,7 @@
  • 直接加载表格数据
  • 表格冻结列
  • 自定义触发事件
  • +
  • 表格标题格式化
  • 表格细节视图
  • 表格父子视图
  • 表格图片预览
  • diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index a1dc1d449..95e2819fb 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -110,6 +110,7 @@
  • 直接加载表格数据
  • 表格冻结列
  • 自定义触发事件
  • +
  • 表格标题格式化
  • 表格细节视图
  • 表格父子视图
  • 表格图片预览