Skip to content

Commit

Permalink
【7.1.2】更新app应用的必填
Browse files Browse the repository at this point in the history
  • Loading branch information
stylefeng committed Aug 27, 2021
1 parent bf4440c commit 1ebac06
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/main/webapp/assets/modular/system/app/app_add.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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) {
}
});

});
16 changes: 15 additions & 1 deletion src/main/webapp/assets/modular/system/app/app_edit.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -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);

});
6 changes: 6 additions & 0 deletions src/main/webapp/pages/modular/system/app/app_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
<input name="appCode" placeholder="请输入应用编码" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/>
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required">应用图标</label>
<div class="layui-input-block">
<input name="appIcon" id="appIcon" placeholder="请输入应用图标" lay-filter="iconPicker" type="text" class="layui-input" lay-verify="required" required/>
</div>
</div>
</div>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/main/webapp/pages/modular/system/app/app_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
<input name="appCode" placeholder="请输入应用编码" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/>
</div>
</div>
<div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required">应用图标</label>
<div class="layui-input-block">
<input name="appIcon" id="appIcon" placeholder="请输入应用图标" lay-filter="iconPicker" type="text" class="layui-input" lay-verify="required" required/>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 1ebac06

Please sign in to comment.