Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
200f6159
Commit
200f6159
authored
Aug 02, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹框增加对esc键的监听
parent
1fb33cda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
guns-base-support/guns-sys/src/main/webapp/assets/expand/module/func/func.js
+12
-2
guns-base-support/guns-sys/src/main/webapp/pages/common/_form.html
+18
-0
No files found.
guns-base-support/guns-sys/src/main/webapp/assets/expand/module/func/func.js
View file @
200f6159
...
@@ -58,7 +58,7 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) {
...
@@ -58,7 +58,7 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) {
layer
.
closeAll
(
'tips'
);
layer
.
closeAll
(
'tips'
);
admin
.
getTempData
(
'formOk'
)
&&
table
.
reload
(
param
.
tableId
);
admin
.
getTempData
(
'formOk'
)
&&
table
.
reload
(
param
.
tableId
);
if
(
param
.
endCallback
)
{
if
(
param
.
endCallback
)
{
admin
.
getTempData
(
'formOk'
)
&&
param
.
endCallback
();
admin
.
getTempData
(
'formOk'
)
&&
param
.
endCallback
();
}
}
...
@@ -66,7 +66,17 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) {
...
@@ -66,7 +66,17 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) {
param
.
fixed
=
false
;
param
.
fixed
=
false
;
param
.
resize
=
false
;
param
.
resize
=
false
;
param
.
shade
=
.
1
;
param
.
shade
=
.
1
;
return
top
.
layui
.
layer
.
open
(
param
);
var
thisIndex
=
top
.
layui
.
layer
.
open
(
param
);
//按键监听esc关闭对话框
$
(
window
).
keydown
(
function
(
event
)
{
if
(
event
.
keyCode
===
27
)
{
parent
.
layer
.
close
(
thisIndex
)
}
});
return
thisIndex
;
}
}
};
};
...
...
guns-base-support/guns-sys/src/main/webapp/pages/common/_form.html
View file @
200f6159
...
@@ -75,5 +75,22 @@ ${layoutContent}
...
@@ -75,5 +75,22 @@ ${layoutContent}
<script
src=
"${item}?v=${constants.getReleaseVersion()}"
></script>
<script
src=
"${item}?v=${constants.getReleaseVersion()}"
></script>
@}
@}
@}
@}
<script>
/**
* 按键监听esc
*/
layui
.
use
([
'admin'
],
function
()
{
var
admin
=
layui
.
admin
;
var
$
=
layui
.
jquery
;
$
(
window
).
keydown
(
function
(
event
)
{
if
(
event
.
keyCode
===
27
)
{
admin
.
closeThisDialog
();
}
});
});
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment