Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
4cec7159
Commit
4cec7159
authored
Feb 09, 2023
by
YIyiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改页面
parent
ed02f100
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
35 deletions
+43
-35
sample-form-client-ui/admin/src/components/Header.vue
sample-form-client-ui/admin/src/components/Header.vue
+3
-32
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
+40
-3
No files found.
sample-form-client-ui/admin/src/components/Header.vue
View file @
4cec7159
...
@@ -18,41 +18,11 @@ export default {
...
@@ -18,41 +18,11 @@ export default {
data
()
{
data
()
{
return
{};
return
{};
},
},
created
()
{
created
()
{},
this
.
isTimeOut
();
},
methods
:
{
methods
:
{
handleBack
()
{
handleBack
()
{
this
.
$router
.
back
();
this
.
$router
.
back
();
},
},
// 5分钟返回首页
startTimer
()
{
let
that
=
this
;
clearInterval
(
that
.
timeOut
);
this
.
timeOut
=
setInterval
(
function
()
{
that
.
$router
.
push
({
path
:
"
/
"
});
},
1000
*
60
*
5
);
},
// 5分钟无任何操作返回首页
isTimeOut
()
{
if
(
this
.
$route
.
path
==
"
/
"
||
this
.
$route
.
path
==
"
/home
"
)
{
return
;
}
this
.
startTimer
();
document
.
body
.
addEventListener
(
"
mousemove
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
mouseup
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
touchend
"
,
this
.
startTimer
);
},
},
beforeDestroy
()
{
document
.
body
.
removeEventListener
(
"
mousemove
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
mouseup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
touchend
"
,
this
.
startTimer
);
clearInterval
(
this
.
timeOut
);
},
},
};
};
</
script
>
</
script
>
...
@@ -63,6 +33,7 @@ export default {
...
@@ -63,6 +33,7 @@ export default {
height: 100px;
height: 100px;
padding: 0px 40px;
padding: 0px 40px;
background: url("../assets/img/title.jpg") no-repeat center;
background: url("../assets/img/title.jpg") no-repeat center;
background-size: 100% 100%;
box-shadow: 0px 2px 6px 6px #ccc;
box-shadow: 0px 2px 6px 6px #ccc;
.back-text {
.back-text {
font-size: 28px;
font-size: 28px;
...
@@ -75,4 +46,4 @@ export default {
...
@@ -75,4 +46,4 @@ export default {
color: #ffffff;
color: #ffffff;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
View file @
4cec7159
...
@@ -5,12 +5,49 @@
...
@@ -5,12 +5,49 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{};
export
default
{
data
()
{
return
{};
},
created
()
{
this
.
isTimeOut
();
},
methods
:
{
// 返回首页
startTimer
()
{
let
that
=
this
;
clearInterval
(
that
.
timeOut
);
this
.
timeOut
=
setInterval
(
function
()
{
that
.
$router
.
push
({
path
:
"
/
"
});
},
1000
*
60
*
2
);
},
// 无任何操作返回首页
isTimeOut
()
{
if
(
this
.
$route
.
path
==
"
/
"
||
this
.
$route
.
path
==
"
/home
"
)
{
return
;
}
this
.
startTimer
();
document
.
body
.
addEventListener
(
"
mousemove
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
mouseup
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
addEventListener
(
"
touchend
"
,
this
.
startTimer
);
},
},
beforeDestroy
()
{
document
.
body
.
removeEventListener
(
"
mousemove
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
mouseup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
touchend
"
,
this
.
startTimer
);
clearInterval
(
this
.
timeOut
);
},
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.layouts {
.layouts {
width: 100%;
width: 100%;
height: auto;
height: auto;
}
}
</
style
>
</
style
>
\ 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