Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
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-admin-template
Commits
d7b84c78
Commit
d7b84c78
authored
Jun 29, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lock-screen): fix lock-screen can skip on new window
修复锁屏功能可以通过刷新页面或复制 URL 打开新的浏览器标签来跳过锁定状态的问题
parent
c99cf5e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
lock.ts
src/store/modules/lock.ts
+2
-2
persistent.ts
src/utils/cache/persistent.ts
+13
-5
No files found.
CHANGELOG.zh_CN.md
View file @
d7b84c78
...
...
@@ -11,6 +11,7 @@
-
**SvgIcon**
修复图标样式问题
-
**Table**
修复为 table 提供 rowSelection.onChange 时,无法手动变更 table 的选中项的问题
-
**Icon**
修复 SvgIcon 缺少部分样式的问题
-
**LockScreen**
修复锁屏功能可以通过刷新页面或复制 URL 打开新的浏览器标签来跳过锁定状态的问题
## 2.5.2(2021-06-27)
...
...
src/store/modules/lock.ts
View file @
d7b84c78
...
...
@@ -23,10 +23,10 @@ export const useLockStore = defineStore({
actions
:
{
setLockInfo
(
info
:
LockInfo
)
{
this
.
lockInfo
=
Object
.
assign
({},
this
.
lockInfo
,
info
);
Persistent
.
setLocal
(
LOCK_INFO_KEY
,
this
.
lockInfo
);
Persistent
.
setLocal
(
LOCK_INFO_KEY
,
this
.
lockInfo
,
true
);
},
resetLockInfo
()
{
Persistent
.
removeLocal
(
LOCK_INFO_KEY
);
Persistent
.
removeLocal
(
LOCK_INFO_KEY
,
true
);
this
.
lockInfo
=
null
;
},
// Unlock
...
...
src/utils/cache/persistent.ts
View file @
d7b84c78
...
...
@@ -57,12 +57,14 @@ export class Persistent {
immediate
&&
ls
.
set
(
APP_LOCAL_CACHE_KEY
,
localMemory
.
getCache
);
}
static
removeLocal
(
key
:
LocalKeys
):
void
{
static
removeLocal
(
key
:
LocalKeys
,
immediate
=
false
):
void
{
localMemory
.
remove
(
key
);
immediate
&&
ls
.
set
(
APP_LOCAL_CACHE_KEY
,
localMemory
.
getCache
);
}
static
clearLocal
():
void
{
static
clearLocal
(
immediate
=
false
):
void
{
localMemory
.
clear
();
immediate
&&
ls
.
clear
();
}
static
getSession
<
T
>
(
key
:
SessionKeys
)
{
...
...
@@ -74,16 +76,22 @@ export class Persistent {
immediate
&&
ss
.
set
(
APP_SESSION_CACHE_KEY
,
sessionMemory
.
getCache
);
}
static
removeSession
(
key
:
SessionKeys
):
void
{
static
removeSession
(
key
:
SessionKeys
,
immediate
=
false
):
void
{
sessionMemory
.
remove
(
key
);
immediate
&&
ss
.
set
(
APP_SESSION_CACHE_KEY
,
sessionMemory
.
getCache
);
}
static
clearSession
():
void
{
static
clearSession
(
immediate
=
false
):
void
{
sessionMemory
.
clear
();
immediate
&&
ss
.
clear
();
}
static
clearAll
()
{
static
clearAll
(
immediate
=
false
)
{
sessionMemory
.
clear
();
localMemory
.
clear
();
if
(
immediate
)
{
ls
.
clear
();
ss
.
clear
();
}
}
}
...
...
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