-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the module file of each page module to export a usable store
- Loading branch information
1 parent
5ed44c9
commit 68af70a
Showing
41 changed files
with
205 additions
and
205 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
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
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,14 @@ | ||
export const enum LayoutSize { | ||
SM = 'sm', | ||
MD = 'md', | ||
LG = 'lg' | ||
} | ||
|
||
export interface LayoutState { | ||
screenSize: LayoutSize | ||
rebackSize: LayoutSize | ||
} | ||
|
||
export const enum LayoutActions { | ||
CHANGE_WINDOW_SIZE = 'CHANGE_WINDOW_SIZE' | ||
} |
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,15 @@ | ||
import { state } from './state' | ||
import { actions, mutations } from './sage' | ||
export { LayoutActions } from './sage' | ||
import { mutations } from './sage' | ||
import { uesModuleStore } from '@/hooks/index' | ||
import { LayoutState } from '@/interface' | ||
|
||
export * from './state' | ||
export const LayoutNameSpaced = 'Layout' | ||
|
||
export const NAMESPACED = 'Layout' | ||
export const useLayoutModule = () => | ||
uesModuleStore<LayoutState>(LayoutNameSpaced) | ||
|
||
export default { | ||
namespaced: true, | ||
state, | ||
actions, | ||
mutations | ||
} |
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 |
---|---|---|
@@ -1,15 +1,6 @@ | ||
export const enum Size { | ||
SM = 'sm', | ||
MD = 'md', | ||
LG = 'lg' | ||
} | ||
|
||
export interface State { | ||
screenSize: Size | ||
rebackSize: Size | ||
} | ||
import { LayoutState, LayoutSize } from '@/interface' | ||
|
||
export const state: State = { | ||
screenSize: Size.MD, | ||
rebackSize: Size.MD | ||
export const state: LayoutState = { | ||
screenSize: LayoutSize.MD, | ||
rebackSize: LayoutSize.MD | ||
} |
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,14 @@ | ||
import { SongsDetail } from '@/interface' | ||
|
||
export interface Downloaded extends SongsDetail { | ||
time: string | ||
} | ||
|
||
export interface DownloadState { | ||
downloaded: Downloaded[] | ||
} | ||
|
||
export const enum DownloadActions { | ||
DOWNLOAD_MUSIC = 'DOWNLOAD_MUSIC' | ||
} | ||
export const enum DownloadMutations {} |
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
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
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
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
Oops, something went wrong.