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
love_飞影
Neos
Commits
e23ceeb3
Commit
e23ceeb3
authored
Aug 24, 2023
by
timel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/limit' into 'main'
fix: limit forbidden See merge request
!289
parents
e74d25d2
1dda3b3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/ui/BuildDeck/store.ts
src/ui/BuildDeck/store.ts
+3
-2
No files found.
src/ui/BuildDeck/store.ts
View file @
e23ceeb3
import
{
proxy
}
from
"
valtio
"
;
import
{
type
CardMeta
,
forbidden
}
from
"
@/api
"
;
import
{
type
CardMeta
}
from
"
@/api
"
;
import
{
isExtraDeckCard
,
isToken
}
from
"
@/common
"
;
import
{
compareCards
,
type
EditingDeck
,
type
Type
}
from
"
./utils
"
;
...
...
@@ -78,7 +78,7 @@ export const editDeckStore = proxy({
reason
=
"
卡片种类不符合
"
;
}
const
max
=
forbidden
.
get
(
card
.
id
)
??
3
;
// TODO:
禁卡表
const
max
=
3
;
// 这里无需参考
禁卡表
const
numOfSameCards
=
editDeckStore
.
getAll
().
filter
((
c
)
=>
c
.
id
===
card
.
id
).
length
-
(
source
!==
"
search
"
?
1
:
0
);
...
...
@@ -87,6 +87,7 @@ export const editDeckStore = proxy({
result
=
false
;
reason
=
`超过同名卡
${
max
}
张的上限`
;
}
return
{
result
,
reason
};
},
})
satisfies
EditingDeck
;
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