Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-admin
Commits
c3be29a1
Commit
c3be29a1
authored
Nov 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete: 删除多余store
parent
487edb8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
33 deletions
+0
-33
index.ts
src/store/globalSelect/index.ts
+0
-31
index.tsx
src/store/index.tsx
+0
-2
No files found.
src/store/globalSelect/index.ts
deleted
100644 → 0
View file @
487edb8f
import
{
action
,
computed
,
observable
,
runInAction
,
autorun
}
from
'mobx'
import
{
IGlobalSelectModule
}
from
'@/module/globalSelectModule'
import
{
getAllCountrys
,
getAllCurrencys
,
getAllLanguages
,
getAllShops
}
from
'@/services/global'
import
{
getAsyncSelectList
}
from
'@/utils'
class
GlobalSelectStore
implements
IGlobalSelectModule
{
@
observable
public
allCountrys
:
GlobalAPI
.
CountryItem
[]
=
[]
@
observable
public
allCurrencys
:
GlobalAPI
.
CurrencyItem
[]
=
[]
@
observable
public
allLanguages
:
GlobalAPI
.
LanguageItem
[]
=
[]
@
observable
public
allShops
:
GlobalAPI
.
ShopItem
[]
=
[]
@
action
.
bound
async
initData
()
{
const
[
countryResult
,
currentyResult
,
languageResult
,
shopResult
]
=
await
getAsyncSelectList
([
getAllCountrys
(),
getAllCurrencys
(),
getAllLanguages
(),
getAllShops
()
])
runInAction
(
'reset all GlobalSelect'
,
()
=>
{
this
.
allCountrys
=
countryResult
||
[]
this
.
allCurrencys
=
currentyResult
||
[]
this
.
allLanguages
=
languageResult
||
[]
this
.
allShops
=
shopResult
||
[]
})
}
}
export
default
GlobalSelectStore
\ No newline at end of file
src/store/index.tsx
View file @
c3be29a1
import
TestStore
from
'./test'
import
React
from
'react'
;
import
{
Provider
}
from
'mobx-react'
import
GlobalSelectStore
from
'./globalSelect'
;
import
SiteStore
from
'./site'
import
MemberStore
from
'./member'
import
UserStore
from
'./user'
...
...
@@ -34,7 +33,6 @@ export interface IStore {
export
const
store
=
{
UserStore
:
new
UserStore
,
testStore
:
new
TestStore
,
globalStore
:
new
GlobalSelectStore
,
SiteStore
:
new
SiteStore
,
MemberStore
:
new
MemberStore
,
indexStore
:
new
GlobalStore
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment