Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-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
赵啸非
refined-platform
Commits
3091ce21
Commit
3091ce21
authored
Apr 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加session.js文件
parent
9a8ac265
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
refined-manager-ui/admin/src/assets/utils/session.js
refined-manager-ui/admin/src/assets/utils/session.js
+28
-0
No files found.
refined-manager-ui/admin/src/assets/utils/session.js
0 → 100644
View file @
3091ce21
/**
* 本地存储函数
*/
const
session
=
{
// 设置
setSession
(
key
,
val
)
{
sessionStorage
.
setItem
(
key
,
JSON
.
stringify
(
val
));
},
// 获取
getSession
(
key
)
{
return
JSON
.
parse
(
sessionStorage
.
getItem
(
key
));
},
// 删除本地存储
removeSession
(
key
)
{
sessionStorage
.
removeItem
(
key
)
},
// 清空本地存储
clearSession
()
{
sessionStorage
.
clear
();
},
};
// 暴露
export
default
session
;
\ 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