Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
81dce88f
Commit
81dce88f
authored
Aug 07, 2023
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
再利用数据缓存
parent
97414985
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
index.vue
src/views/processManagement/deviceReuse/index.vue
+12
-0
No files found.
src/views/processManagement/deviceReuse/index.vue
View file @
81dce88f
...
...
@@ -70,6 +70,8 @@ export default {
name
:
'Role'
,
data
()
{
return
{
// 缓存判断
exist
:
false
,
form
:
{
pn
:
''
,
lot
:
''
,
...
...
@@ -117,7 +119,17 @@ export default {
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
})
},
// 路由跳转,是存储页面的值
beforeRouteLeave
(
to
,
from
,
next
)
{
console
.
log
(
'form'
)
localStorage
.
setItem
(
'form'
,
JSON
.
stringify
(
this
.
form
))
next
()
},
created
()
{
localStorage
.
getItem
(
'form'
)
?
this
.
exist
=
true
:
this
.
exist
=
false
if
(
this
.
exist
)
{
this
.
form
=
JSON
.
parse
(
localStorage
.
getItem
(
'form'
))
}
},
methods
:
{
// 回车跳转下一个输入框
...
...
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