From 1ebac06f840478c5c9b40945ca40df106cfffdc4 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Fri, 27 Aug 2021 20:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.1.2=E3=80=91=E6=9B=B4=E6=96=B0app?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=9A=84=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/assets/modular/system/app/app_add.js | 14 +++++++++++++- .../webapp/assets/modular/system/app/app_edit.js | 16 +++++++++++++++- .../webapp/pages/modular/system/app/app_add.html | 6 ++++++ .../pages/modular/system/app/app_edit.html | 6 ++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/assets/modular/system/app/app_add.js b/src/main/webapp/assets/modular/system/app/app_add.js index 97741dd4d..d8b953140 100644 --- a/src/main/webapp/assets/modular/system/app/app_add.js +++ b/src/main/webapp/assets/modular/system/app/app_add.js @@ -1,10 +1,11 @@ /** * 添加应用 */ -layui.use(['form', 'admin', 'HttpRequest'], function () { +layui.use(['form', 'admin', 'HttpRequest', 'iconPicker'], function () { var form = layui.form; var admin = layui.admin; var HttpRequest = layui.HttpRequest; + var iconPicker = layui.iconPicker; //表单提交事件 form.on('submit(btnSubmit)', function (data) { @@ -20,4 +21,15 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { request.start(true); }); + //初始化图标选择 + iconPicker.render({ + elem: '#appIcon', + type: 'fontClass', + search: true, + page: true, + limit: 12, + click: function (data) { + } + }); + }); diff --git a/src/main/webapp/assets/modular/system/app/app_edit.js b/src/main/webapp/assets/modular/system/app/app_edit.js index b5d37093e..a6e50668e 100644 --- a/src/main/webapp/assets/modular/system/app/app_edit.js +++ b/src/main/webapp/assets/modular/system/app/app_edit.js @@ -1,10 +1,11 @@ /** * 编辑应用 */ -layui.use(['form', 'admin', 'HttpRequest'], function () { +layui.use(['form', 'admin', 'HttpRequest', 'iconPicker'], function () { var form = layui.form; var admin = layui.admin; var HttpRequest = layui.HttpRequest; + var iconPicker = layui.iconPicker; // 获取应用详情 var request = new HttpRequest(Feng.ctxPath + "/sysApp/detail?appId=" + Feng.getUrlParam("appId"), 'get'); @@ -26,4 +27,17 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { request.start(true); }); + //初始化图标选择 + iconPicker.render({ + elem: '#appIcon', + type: 'fontClass', + search: true, + page: true, + limit: 12, + click: function (data) { + } + }); + + iconPicker.checkIcon('iconPicker', result.data.appIcon); + }); diff --git a/src/main/webapp/pages/modular/system/app/app_add.html b/src/main/webapp/pages/modular/system/app/app_add.html index 4815084f3..4b622b1b5 100644 --- a/src/main/webapp/pages/modular/system/app/app_add.html +++ b/src/main/webapp/pages/modular/system/app/app_add.html @@ -18,6 +18,12 @@ +
+ +
+ +
+
diff --git a/src/main/webapp/pages/modular/system/app/app_edit.html b/src/main/webapp/pages/modular/system/app/app_edit.html index e974057e8..e5add78ce 100644 --- a/src/main/webapp/pages/modular/system/app/app_edit.html +++ b/src/main/webapp/pages/modular/system/app/app_edit.html @@ -18,6 +18,12 @@ +
+ +
+ +
+