提交 cd4b5e14 编写于 作者: V vben

fix(types): fix store types

上级 765064a1
......@@ -33,9 +33,9 @@
},
"dependencies": {
"@iconify/iconify": "^2.0.1",
"@logicflow/core": "^0.4.6",
"@logicflow/extension": "^0.4.6",
"@vueuse/core": "^4.11.0",
"@logicflow/core": "^0.4.7",
"@logicflow/extension": "^0.4.7",
"@vueuse/core": "^4.11.1",
"@zxcvbn-ts/core": "^0.3.0",
"ant-design-vue": "^2.1.6",
"axios": "^0.21.1",
......@@ -47,7 +47,7 @@
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.0",
"pinia": "2.0.0-alpha.19",
"pinia": "2.0.0-alpha.13",
"print-js": "^1.6.0",
"qrcode": "^1.4.4",
"sortablejs": "^1.13.0",
......@@ -63,7 +63,7 @@
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@iconify/json": "^1.1.347",
"@iconify/json": "^1.1.348",
"@purge-icons/generated": "^0.7.0",
"@types/codemirror": "^5.60.0",
"@types/crypto-js": "^4.0.1",
......@@ -75,8 +75,8 @@
"@types/qrcode": "^1.4.0",
"@types/qs": "^6.9.6",
"@types/sortablejs": "^1.10.6",
"@typescript-eslint/eslint-plugin": "^4.24.0",
"@typescript-eslint/parser": "^4.24.0",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"@vitejs/plugin-legacy": "^1.4.0",
"@vitejs/plugin-vue": "^1.2.2",
"@vitejs/plugin-vue-jsx": "^1.1.4",
......@@ -108,21 +108,21 @@
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-order": "^4.1.0",
"ts-node": "^9.1.1",
"ts-node": "^10.0.0",
"typescript": "4.2.4",
"vite": "2.3.3",
"vite-plugin-compression": "^0.2.5",
"vite-plugin-html": "^2.0.7",
"vite-plugin-imagemin": "^0.3.2",
"vite-plugin-mock": "^2.5.0",
"vite-plugin-mock": "^2.5.2",
"vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.7.3",
"vite-plugin-style-import": "^0.10.0",
"vite-plugin-svg-icons": "^0.5.0",
"vite-plugin-svg-icons": "^0.6.0",
"vite-plugin-theme": "^0.7.1",
"vite-plugin-windicss": "0.15.10",
"vite-plugin-windicss": "0.16.0",
"vue-eslint-parser": "^7.6.0",
"vue-tsc": "^0.1.3"
"vue-tsc": "^0.1.6"
},
"resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
......
......@@ -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);
},
},
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册