提交 bbf178f6 编写于 作者: V vben

fix(store): fix pinia typo

上级 8e3f84c3
......@@ -47,7 +47,7 @@
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.0",
"pinia": "2.0.0-alpha.13",
"pinia": "2.0.0-alpha.19",
"print-js": "^1.6.0",
"qrcode": "^1.4.4",
"sortablejs": "^1.13.0",
......@@ -85,7 +85,7 @@
"commitizen": "^4.2.4",
"conventional-changelog-cli": "^2.1.1",
"cross-env": "^7.0.3",
"dotenv": "^9.0.2",
"dotenv": "^10.0.0",
"eslint": "^7.27.0",
"eslint-config-prettier": "^8.3.0",
"eslint-define-config": "^1.0.8",
......@@ -127,7 +127,7 @@
"resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china",
"rollup": "^2.48.0"
"rollup": "^2.49.0"
},
"repository": {
"type": "git",
......
......@@ -30,31 +30,31 @@ export const useAppStore = defineStore({
beforeMiniInfo: {},
}),
getters: {
getPageLoading() {
getPageLoading(_) {
return this.pageLoading;
},
getDarkMode(): 'light' | 'dark' | string {
getDarkMode(_): 'light' | 'dark' | string {
return this.darkMode || localStorage.getItem(APP_DARK_MODE_KEY_) || darkMode;
},
getBeforeMiniInfo() {
getBeforeMiniInfo(_) {
return this.beforeMiniInfo;
},
getProjectConfig(): ProjectConfig {
getProjectConfig(_): ProjectConfig {
return this.projectConfig || ({} as ProjectConfig);
},
getHeaderSetting() {
getHeaderSetting(_) {
return this.getProjectConfig.headerSetting;
},
getMenuSetting() {
getMenuSetting(_) {
return this.getProjectConfig.menuSetting;
},
getTransitionSetting() {
getTransitionSetting(_) {
return this.getProjectConfig.transitionSetting;
},
getMultiTabsSetting() {
getMultiTabsSetting(_) {
return this.getProjectConfig.multiTabsSetting;
},
},
......
......@@ -20,10 +20,10 @@ export const useErrorLogStore = defineStore({
errorLogListCount: 0,
}),
getters: {
getErrorLogInfoList() {
getErrorLogInfoList(_) {
return this.errorLogInfoList || [];
},
getErrorLogListCount() {
getErrorLogListCount(_) {
return this.errorLogListCount;
},
},
......
......@@ -21,10 +21,10 @@ export const useLocaleStore = defineStore({
localInfo: lsLocaleSetting,
}),
getters: {
getShowPicker() {
getShowPicker(_) {
return !!this.localInfo?.showPicker;
},
getLocale(): LocaleType {
getLocale(_): LocaleType {
return this.localInfo?.locale ?? 'zh_CN';
},
},
......
......@@ -16,7 +16,7 @@ export const useLockStore = defineStore({
lockInfo: Persistent.getLocal(LOCK_INFO_KEY),
}),
getters: {
getLockInfo() {
getLockInfo(_) {
return this.lockInfo;
},
},
......
......@@ -38,13 +38,13 @@ export const useMultipleTabStore = defineStore({
lastDragEndIndex: 0,
}),
getters: {
getTabList() {
getTabList(_) {
return this.tabList;
},
getCachedTabList(): string[] {
getCachedTabList(_): string[] {
return Array.from(this.cacheTabList);
},
getLastDragEndIndex(): number {
getLastDragEndIndex(_): number {
return this.lastDragEndIndex;
},
},
......
......@@ -45,16 +45,16 @@ export const usePermissionStore = defineStore({
backMenuList: [],
}),
getters: {
getPermCodeList() {
getPermCodeList(_) {
return this.permCodeList;
},
getBackMenuList() {
getBackMenuList(_) {
return this.backMenuList;
},
getLastBuildMenuTime() {
getLastBuildMenuTime(_) {
return this.lastBuildMenuTime;
},
getIsDynamicAddedRoute() {
getIsDynamicAddedRoute(_) {
return this.isDynamicAddedRoute;
},
},
......
......@@ -38,13 +38,13 @@ export const useUserStore = defineStore({
roleList: [],
}),
getters: {
getUserInfo(): UserInfo {
getUserInfo(_): UserInfo {
return this.userInfo || getAuthCache<UserInfo>(USER_INFO_KEY) || {};
},
getToken(): string {
getToken(_): string {
return this.token || getAuthCache<string>(TOKEN_KEY);
},
getRoleList(): RoleEnum[] {
getRoleList(_): RoleEnum[] {
return this.roleList.length > 0 ? this.roleList : getAuthCache<RoleEnum[]>(ROLES_KEY);
},
},
......
......@@ -3937,10 +3937,10 @@ dot-prop@^5.1.0:
dependencies:
is-obj "^2.0.0"
dotenv@^9.0.2:
version "9.0.2"
resolved "https://registry.npmjs.org/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05"
integrity sha512-I9OvvrHp4pIARv4+x9iuewrWycX6CcZtoAu1XrzPxc5UygMJXJZYmBsynku8IkrJwgypE5DGNjDPmPRhDCptUg==
dotenv@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
download@^6.2.2:
version "6.2.5"
......@@ -7815,10 +7815,12 @@ pify@^4.0.1:
resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
pinia@2.0.0-alpha.13:
version "2.0.0-alpha.13"
resolved "https://registry.npmjs.org/pinia/-/pinia-2.0.0-alpha.13.tgz#d48e6efec11d38201e20770bc02b168e2157a9f7"
integrity sha512-3r9fpUi5Uai48vjeTXzcHAvlDjYvx/9mNtWiO5QyWy4zqfn7YjvOiBCHXH9r1jwo4LakZzG/ppr5i6sr/63fYQ==
pinia@2.0.0-alpha.19:
version "2.0.0-alpha.19"
resolved "https://registry.yarnpkg.com/pinia/-/pinia-2.0.0-alpha.19.tgz#0a119c65585a67f7756d5995d11d4b1df4acfbeb"
integrity sha512-U/FvKm2tVUdqEuPorkYvD3oCgIj/u5EnF9TbX5dEpkNkoWKQM1i23e97QKtQFGuTxMSfzmBFFINv4A9VeVZ1wQ==
dependencies:
"@vue/devtools-api" "^6.0.0-beta.10"
pinkie-promise@^2.0.0:
version "2.0.1"
......@@ -8778,10 +8780,10 @@ rollup-plugin-visualizer@5.5.0:
source-map "^0.7.3"
yargs "^16.2.0"
rollup@^2.38.5, rollup@^2.43.1, rollup@^2.45.2, rollup@^2.48.0:
version "2.48.0"
resolved "https://registry.npmjs.org/rollup/-/rollup-2.48.0.tgz#fceb01ed771f991f29f7bd2ff7838146e55acb74"
integrity sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==
rollup@^2.38.5, rollup@^2.43.1, rollup@^2.45.2, rollup@^2.49.0:
version "2.49.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.49.0.tgz#f0e5bb2b770ddf1be8cc30d4cce3457574c8c871"
integrity sha512-UnrCjMXICx9q0jF8L7OYs7LPk95dW0U5UYp/VANnWqfuhyr66FWi/YVlI34Oy8Tp4ZGLcaUDt4APJm80b9oPWQ==
optionalDependencies:
fsevents "~2.3.1"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册