Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenSun1
vue-vben-admin
提交
74ded8ae
V
vue-vben-admin
项目概览
ChenSun1
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
74ded8ae
编写于
3月 24, 2023
作者:
L
LooSheng
提交者:
GitHub
3月 24, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf: respect the writing style of pinia getters (#2645)
上级
d620758c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
44 addition
and
44 deletion
+44
-44
src/store/modules/app.ts
src/store/modules/app.ts
+8
-8
src/store/modules/errorLog.ts
src/store/modules/errorLog.ts
+4
-4
src/store/modules/locale.ts
src/store/modules/locale.ts
+4
-4
src/store/modules/lock.ts
src/store/modules/lock.ts
+2
-2
src/store/modules/multipleTab.ts
src/store/modules/multipleTab.ts
+6
-6
src/store/modules/permission.ts
src/store/modules/permission.ts
+10
-10
src/store/modules/user.ts
src/store/modules/user.ts
+10
-10
未找到文件。
src/store/modules/app.ts
浏览文件 @
74ded8ae
...
...
@@ -36,19 +36,19 @@ export const useAppStore = defineStore({
beforeMiniInfo
:
{},
}),
getters
:
{
getPageLoading
():
boolean
{
return
this
.
pageLoading
;
getPageLoading
(
state
):
boolean
{
return
state
.
pageLoading
;
},
getDarkMode
():
'
light
'
|
'
dark
'
|
string
{
return
this
.
darkMode
||
localStorage
.
getItem
(
APP_DARK_MODE_KEY_
)
||
darkMode
;
getDarkMode
(
state
):
'
light
'
|
'
dark
'
|
string
{
return
state
.
darkMode
||
localStorage
.
getItem
(
APP_DARK_MODE_KEY_
)
||
darkMode
;
},
getBeforeMiniInfo
():
BeforeMiniState
{
return
this
.
beforeMiniInfo
;
getBeforeMiniInfo
(
state
):
BeforeMiniState
{
return
state
.
beforeMiniInfo
;
},
getProjectConfig
():
ProjectConfig
{
return
this
.
projectConfig
||
({}
as
ProjectConfig
);
getProjectConfig
(
state
):
ProjectConfig
{
return
state
.
projectConfig
||
({}
as
ProjectConfig
);
},
getHeaderSetting
():
HeaderSetting
{
...
...
src/store/modules/errorLog.ts
浏览文件 @
74ded8ae
...
...
@@ -20,11 +20,11 @@ export const useErrorLogStore = defineStore({
errorLogListCount
:
0
,
}),
getters
:
{
getErrorLogInfoList
():
ErrorLogInfo
[]
{
return
this
.
errorLogInfoList
||
[];
getErrorLogInfoList
(
state
):
ErrorLogInfo
[]
{
return
state
.
errorLogInfoList
||
[];
},
getErrorLogListCount
():
number
{
return
this
.
errorLogListCount
;
getErrorLogListCount
(
state
):
number
{
return
state
.
errorLogListCount
;
},
},
actions
:
{
...
...
src/store/modules/locale.ts
浏览文件 @
74ded8ae
...
...
@@ -21,11 +21,11 @@ export const useLocaleStore = defineStore({
localInfo
:
lsLocaleSetting
,
}),
getters
:
{
getShowPicker
():
boolean
{
return
!!
this
.
localInfo
?.
showPicker
;
getShowPicker
(
state
):
boolean
{
return
!!
state
.
localInfo
?.
showPicker
;
},
getLocale
():
LocaleType
{
return
this
.
localInfo
?.
locale
??
'
zh_CN
'
;
getLocale
(
state
):
LocaleType
{
return
state
.
localInfo
?.
locale
??
'
zh_CN
'
;
},
},
actions
:
{
...
...
src/store/modules/lock.ts
浏览文件 @
74ded8ae
...
...
@@ -16,8 +16,8 @@ export const useLockStore = defineStore({
lockInfo
:
Persistent
.
getLocal
(
LOCK_INFO_KEY
),
}),
getters
:
{
getLockInfo
():
Nullable
<
LockInfo
>
{
return
this
.
lockInfo
;
getLockInfo
(
state
):
Nullable
<
LockInfo
>
{
return
state
.
lockInfo
;
},
},
actions
:
{
...
...
src/store/modules/multipleTab.ts
浏览文件 @
74ded8ae
...
...
@@ -48,14 +48,14 @@ export const useMultipleTabStore = defineStore({
lastDragEndIndex
:
0
,
}),
getters
:
{
getTabList
():
RouteLocationNormalized
[]
{
return
this
.
tabList
;
getTabList
(
state
):
RouteLocationNormalized
[]
{
return
state
.
tabList
;
},
getCachedTabList
():
string
[]
{
return
Array
.
from
(
this
.
cacheTabList
);
getCachedTabList
(
state
):
string
[]
{
return
Array
.
from
(
state
.
cacheTabList
);
},
getLastDragEndIndex
():
number
{
return
this
.
lastDragEndIndex
;
getLastDragEndIndex
(
state
):
number
{
return
state
.
lastDragEndIndex
;
},
},
actions
:
{
...
...
src/store/modules/permission.ts
浏览文件 @
74ded8ae
...
...
@@ -60,20 +60,20 @@ export const usePermissionStore = defineStore({
frontMenuList
:
[],
}),
getters
:
{
getPermCodeList
():
string
[]
|
number
[]
{
return
this
.
permCodeList
;
getPermCodeList
(
state
):
string
[]
|
number
[]
{
return
state
.
permCodeList
;
},
getBackMenuList
():
Menu
[]
{
return
this
.
backMenuList
;
getBackMenuList
(
state
):
Menu
[]
{
return
state
.
backMenuList
;
},
getFrontMenuList
():
Menu
[]
{
return
this
.
frontMenuList
;
getFrontMenuList
(
state
):
Menu
[]
{
return
state
.
frontMenuList
;
},
getLastBuildMenuTime
():
number
{
return
this
.
lastBuildMenuTime
;
getLastBuildMenuTime
(
state
):
number
{
return
state
.
lastBuildMenuTime
;
},
getIsDynamicAddedRoute
():
boolean
{
return
this
.
isDynamicAddedRoute
;
getIsDynamicAddedRoute
(
state
):
boolean
{
return
state
.
isDynamicAddedRoute
;
},
},
actions
:
{
...
...
src/store/modules/user.ts
浏览文件 @
74ded8ae
...
...
@@ -40,20 +40,20 @@ export const useUserStore = defineStore({
lastUpdateTime
:
0
,
}),
getters
:
{
getUserInfo
():
UserInfo
{
return
this
.
userInfo
||
getAuthCache
<
UserInfo
>
(
USER_INFO_KEY
)
||
{};
getUserInfo
(
state
):
UserInfo
{
return
state
.
userInfo
||
getAuthCache
<
UserInfo
>
(
USER_INFO_KEY
)
||
{};
},
getToken
():
string
{
return
this
.
token
||
getAuthCache
<
string
>
(
TOKEN_KEY
);
getToken
(
state
):
string
{
return
state
.
token
||
getAuthCache
<
string
>
(
TOKEN_KEY
);
},
getRoleList
():
RoleEnum
[]
{
return
this
.
roleList
.
length
>
0
?
this
.
roleList
:
getAuthCache
<
RoleEnum
[]
>
(
ROLES_KEY
);
getRoleList
(
state
):
RoleEnum
[]
{
return
state
.
roleList
.
length
>
0
?
state
.
roleList
:
getAuthCache
<
RoleEnum
[]
>
(
ROLES_KEY
);
},
getSessionTimeout
():
boolean
{
return
!!
this
.
sessionTimeout
;
getSessionTimeout
(
state
):
boolean
{
return
!!
state
.
sessionTimeout
;
},
getLastUpdateTime
():
number
{
return
this
.
lastUpdateTime
;
getLastUpdateTime
(
state
):
number
{
return
state
.
lastUpdateTime
;
},
},
actions
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录