切换导航条
切换导航条
当前项目
正在载入...
登录
术习电报
/
electron-vue-template
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
作者
umbrella22
2021-02-03 15:30:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提交
84386357e9266540e600c5e3b573622cc0cecd8b
84386357
1 个父辈
ade4599a
去除错误的方法
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
5 行删除
src/renderer/store/modules/app.js
src/renderer/store/modules/app.js
查看文件 @
8438635
import
Cookies
from
'js-cookie'
const
app
=
{
state
:
{
sidebar
:
{
opened
:
!+
Cookies
.
get
(
'sidebarStatus'
),
opened
:
!+
localStorage
.
getItem
(
'sidebarStatus'
),
withoutAnimation
:
false
},
device
:
'desktop'
...
...
@@ -11,14 +10,14 @@ const app = {
mutations
:
{
TOGGLE_SIDEBAR
:
state
=>
{
if
(
state
.
sidebar
.
opened
)
{
Cookies
.
set
(
'sidebarStatus'
,
1
)
localStorage
.
setItem
(
'sidebarStatus'
,
1
)
}
else
{
Cookies
.
set
(
'sidebarStatus'
,
0
)
localStorage
.
setItem
(
'sidebarStatus'
,
0
)
}
state
.
sidebar
.
opened
=
!
state
.
sidebar
.
opened
},
CLOSE_SIDEBAR
:
(
state
,
withoutAnimation
)
=>
{
Cookies
.
set
(
'sidebarStatus'
,
1
)
localStorage
.
setItem
(
'sidebarStatus'
,
1
)
state
.
sidebar
.
opened
=
false
state
.
sidebar
.
withoutAnimation
=
withoutAnimation
},
...
...
请
注册
或
登录
后发表评论