Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baichixing
Neos
Commits
97944531
Commit
97944531
authored
Jan 02, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update modal slice
parent
cb3c9e01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+1
-0
src/reducers/duel/modalSlice.ts
src/reducers/duel/modalSlice.ts
+33
-1
No files found.
src/reducers/duel/mod.ts
View file @
97944531
...
@@ -76,6 +76,7 @@ const initialState: DuelState = {
...
@@ -76,6 +76,7 @@ const initialState: DuelState = {
modalState
:
{
modalState
:
{
cardModal
:
{
isOpen
:
false
,
interactivies
:
[]
},
cardModal
:
{
isOpen
:
false
,
interactivies
:
[]
},
cardListModal
:
{
isOpen
:
false
,
list
:
[]
},
cardListModal
:
{
isOpen
:
false
,
list
:
[]
},
checkCardModal
:
{
isOpen
:
false
,
tags
:
[]
},
},
},
};
};
...
...
src/reducers/duel/modalSlice.ts
View file @
97944531
...
@@ -20,6 +20,21 @@ export interface ModalState {
...
@@ -20,6 +20,21 @@ export interface ModalState {
imgUrl
?:
string
;
imgUrl
?:
string
;
}[];
}[];
};
};
// 卡牌选择弹窗
checkCardModal
:
{
isOpen
:
boolean
;
selectMin
?:
number
;
selectMax
?:
number
;
tags
:
{
tagName
:
string
;
options
:
{
name
?:
string
;
desc
?:
string
;
imgUrl
?:
string
;
response
:
number
;
}[];
}[];
};
}
}
// 更新卡牌弹窗打开状态
// 更新卡牌弹窗打开状态
...
@@ -66,7 +81,7 @@ export const setCardListModalIsOpenImpl: CaseReducer<
...
@@ -66,7 +81,7 @@ export const setCardListModalIsOpenImpl: CaseReducer<
state
.
modalState
.
cardListModal
.
isOpen
=
action
.
payload
;
state
.
modalState
.
cardListModal
.
isOpen
=
action
.
payload
;
};
};
// 更新卡牌列表
文本
// 更新卡牌列表
数据
export
const
setCardListModalInfoImpl
:
CaseReducer
<
export
const
setCardListModalInfoImpl
:
CaseReducer
<
DuelState
,
DuelState
,
PayloadAction
<
{
name
?:
string
;
desc
?:
string
;
imgUrl
?:
string
}[]
>
PayloadAction
<
{
name
?:
string
;
desc
?:
string
;
imgUrl
?:
string
}[]
>
...
@@ -76,6 +91,23 @@ export const setCardListModalInfoImpl: CaseReducer<
...
@@ -76,6 +91,23 @@ export const setCardListModalInfoImpl: CaseReducer<
state
.
modalState
.
cardListModal
.
list
=
list
;
state
.
modalState
.
cardListModal
.
list
=
list
;
};
};
// 更新卡牌选择弹窗打开状态
export
const
setCheckCardModalIsOpenImpl
:
CaseReducer
<
DuelState
,
PayloadAction
<
boolean
>
>
=
(
state
,
action
)
=>
{
state
.
modalState
.
checkCardModal
.
isOpen
=
action
.
payload
;
};
// 更新卡牌选择弹窗选择数目状态
export
const
setCheckCardModalMinMaxImpl
:
CaseReducer
<
DuelState
,
PayloadAction
<
{
min
:
number
;
max
:
number
}
>
>
=
(
state
,
action
)
=>
{
state
.
modalState
.
checkCardModal
.
selectMin
=
action
.
payload
.
min
;
state
.
modalState
.
checkCardModal
.
selectMax
=
action
.
payload
.
max
;
};
export
const
selectCardModalIsOpen
=
(
state
:
RootState
)
=>
export
const
selectCardModalIsOpen
=
(
state
:
RootState
)
=>
state
.
duel
.
modalState
.
cardModal
.
isOpen
;
state
.
duel
.
modalState
.
cardModal
.
isOpen
;
export
const
selectCardModalName
=
(
state
:
RootState
)
=>
export
const
selectCardModalName
=
(
state
:
RootState
)
=>
...
...
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