Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-skynet-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-skynet-admin
Commits
e6eb123b
Commit
e6eb123b
authored
Nov 10, 2021
by
朱松文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭浏览器弹框提示
parent
8a2e212d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
index.html
public/index.html
+0
-10
main.ts
src/main.ts
+15
-0
No files found.
public/index.html
View file @
e6eb123b
...
...
@@ -13,16 +13,6 @@
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div
id=
"app"
></div>
<script>
window
.
addEventListener
(
'
beforeunload
'
,
function
(
event
){
alert
(
''
)
console
.
log
(
'
aa
'
,
event
)
})
// window.onbeforeunload = function (e) {
// alert('')
// }
</script>
<!-- built files will be auto injected -->
</body>
</html>
src/main.ts
View file @
e6eb123b
...
...
@@ -42,3 +42,18 @@ new Vue({
store
,
render
:
(
h
)
=>
h
(
App
),
}).
$mount
(
"
#app
"
);
/*
//关闭浏览器弹框提示
window.onbeforeunload = function (e) {
e = e || window.event;
// 兼容IE8和Firefox 4之前的版本
if (e) {
e.returnValue = '关闭提示';
}
// Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
return '关闭提示';
} */
\ 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