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
54eeaee7
Commit
54eeaee7
authored
Dec 18, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 取消vuex状态持久化
parent
00ee80ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
34 deletions
+32
-34
sample-form-client-ui/admin/src/pages/home/Home.vue
sample-form-client-ui/admin/src/pages/home/Home.vue
+16
-16
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
+4
-2
sample-form-client-ui/admin/src/store/index.js
sample-form-client-ui/admin/src/store/index.js
+12
-16
No files found.
sample-form-client-ui/admin/src/pages/home/Home.vue
View file @
54eeaee7
...
@@ -598,22 +598,22 @@ export default {
...
@@ -598,22 +598,22 @@ export default {
// box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
// box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
position: relative;
position: relative;
overflow: hidden;
overflow: hidden;
//
&::before {
&::before {
//
content: "";
content: "";
//
position: absolute;
position: absolute;
//
width: 200px;
width: 200px;
//
height: 300%;
height: 300%;
//
left: -200px;
left: -200px;
//
transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
//
background: linear-gradient(
background: linear-gradient(
//
to right,
to right,
//
transparent 1%,
transparent 1%,
//
rgba(255, 255, 255, 0.2) 30%,
rgba(255, 255, 255, 0.2) 30%,
//
rgba(255, 255, 255, 0.5) 60%,
rgba(255, 255, 255, 0.5) 60%,
//
transparent 100%
transparent 100%
//
);
);
//
animation: shadow 6s infinite;
animation: shadow 6s infinite;
//
}
}
// .fill-btn-text1 {
// .fill-btn-text1 {
// animation: ring 6s 20ms infinite;
// animation: ring 6s 20ms infinite;
...
...
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
View file @
54eeaee7
...
@@ -8,10 +8,12 @@
...
@@ -8,10 +8,12 @@
import
{
mapMutations
,
mapGetters
}
from
"
vuex
"
;
import
{
mapMutations
,
mapGetters
}
from
"
vuex
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{};
return
{
defaultTimes
:
300
,
};
},
},
computed
:
{
computed
:
{
...
mapGetters
([
"
times
"
,
"
defaultTimes
"
]),
...
mapGetters
([
"
times
"
]),
},
},
created
()
{
created
()
{
this
.
isTimeOut
();
this
.
isTimeOut
();
...
...
sample-form-client-ui/admin/src/store/index.js
View file @
54eeaee7
import
Vue
from
"
vue
"
;
import
Vue
from
"
vue
"
;
import
Vuex
from
"
vuex
"
;
import
Vuex
from
"
vuex
"
;
import
createPersistedState
from
"
vuex-persistedstate
"
;
//
import createPersistedState from "vuex-persistedstate";
import
SecureLS
from
"
secure-ls
"
;
//
import SecureLS from "secure-ls";
var
ls
=
new
SecureLS
({
isCompression
:
false
});
//
var ls = new SecureLS({ isCompression: false });
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
...
@@ -12,8 +12,7 @@ export default new Vuex.Store({
...
@@ -12,8 +12,7 @@ export default new Vuex.Store({
datumList
:
[],
// 首页材料
datumList
:
[],
// 首页材料
matterList
:
[],
// 首页事项
matterList
:
[],
// 首页事项
deviceCode
:
""
,
// 设备编码
deviceCode
:
""
,
// 设备编码
times
:
300
,
// 倒计时时间
times
:
0
,
// 倒计时时间
defaultTimes
:
300
,
// 倒计时时间
operTime
:
""
,
// 样表打开时间
operTime
:
""
,
// 样表打开时间
},
},
getters
:
{
getters
:
{
...
@@ -23,9 +22,6 @@ export default new Vuex.Store({
...
@@ -23,9 +22,6 @@ export default new Vuex.Store({
times
(
state
)
{
times
(
state
)
{
return
state
.
times
;
return
state
.
times
;
},
},
defaultTimes
(
state
)
{
return
state
.
defaultTimes
;
},
operTime
(
state
)
{
operTime
(
state
)
{
return
state
.
operTime
;
return
state
.
operTime
;
},
},
...
@@ -60,13 +56,13 @@ export default new Vuex.Store({
...
@@ -60,13 +56,13 @@ export default new Vuex.Store({
// createPersistedState({
// createPersistedState({
// storage: window.sessionStorage,
// storage: window.sessionStorage,
// }),
// }),
createPersistedState
({
//
createPersistedState({
key
:
"
info
"
,
//
key: "info",
storage
:
{
//
storage: {
getItem
:
(
key
)
=>
ls
.
get
(
key
),
//
getItem: (key) => ls.get(key),
setItem
:
(
key
,
value
)
=>
ls
.
set
(
key
,
value
),
//
setItem: (key, value) => ls.set(key, value),
removeItem
:
(
key
)
=>
ls
.
remove
(
key
),
//
removeItem: (key) => ls.remove(key),
},
//
},
}),
//
}),
],
],
});
});
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