-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
白唯
committed
Nov 9, 2020
1 parent
384499b
commit ed70e47
Showing
7 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
import { AppStateType } from '@/store/modules/app/state' | ||
|
||
// vuex模块的类型 | ||
type ModuleType = { app: AppStateType } | ||
|
||
// 所有的StateType | ||
export type StateType = ModuleType | ||
|
||
/** http请求响应格式 */ | ||
export declare interface ApiResponse { | ||
errCode: number | ||
errMsg?: string | ||
data?: any | ||
} | ||
import { AppStateType } from '@/store/modules/app/state' | ||
import { ConsoleStateType } from '@/store/modules/console/state' | ||
|
||
// vuex模块的类型 | ||
type ModuleType = { app: AppStateType; console: ConsoleStateType } | ||
|
||
// 所有的StateType | ||
export type StateType = ModuleType | ||
|
||
/** http请求响应格式 */ | ||
export declare interface ApiResponse { | ||
errCode: number | ||
errMsg?: string | ||
data?: any | ||
} | ||
|
||
// ant-design-button 颜色 | ||
export type ButtonColorType = | ||
| 'primary' | ||
| 'danger' | ||
| 'dashed' | ||
| 'ghost' | ||
| 'default' | ||
| 'link' | ||
|
||
// icon的类型 | ||
export type IconType = 'icon' | 'iconfont' | ||
|
||
// 对话框打开类型 | ||
export type ModalOpenMode = 'edit' | 'add' | 'other' | ||
|
||
export interface BasicUserType { | ||
name: string | ||
avatar: unknown | ||
role: string | ||
department: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
__set(state: any, msg: { key: string; val: any }) { | ||
state[msg.key] = msg.val | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { StateType } from '@types' | ||
import { Module } from 'vuex' | ||
|
||
// 均放置跟控制台 UI 状态相关内容 | ||
|
||
const state = { | ||
sidebarFold: false, // 侧边栏菜单是否折叠 | ||
thirdPanelFold: true, // 第三级版面是否折叠 | ||
teamDetaiPanel: '0', // 团队详情里 tabbar 当前活跃的 key | ||
teamGroupType: 'all' // 成员分组当前选择 | ||
} | ||
type ConsoleStateType = typeof state | ||
|
||
const console: Module<ConsoleStateType, StateType> = { | ||
namespaced: true, | ||
...state | ||
} | ||
|
||
export { ConsoleStateType, state } | ||
export default console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters