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
b4062341
Commit
b4062341
authored
Apr 26, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: optimize mat store
parent
a23b4d02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
src/valtioStores/matStore/store.ts
src/valtioStores/matStore/store.ts
+3
-7
No files found.
src/valtioStores/matStore/store.ts
View file @
b4062341
...
@@ -110,18 +110,14 @@ class CardArray extends Array<CardState> implements ArrayCardState {
...
@@ -110,18 +110,14 @@ class CardArray extends Array<CardState> implements ArrayCardState {
const
genDuelCardArray
=
(
cardStates
:
CardState
[],
zone
:
ygopro
.
CardZone
)
=>
{
const
genDuelCardArray
=
(
cardStates
:
CardState
[],
zone
:
ygopro
.
CardZone
)
=>
{
const
me
=
cloneDeep
(
new
CardArray
(...
cardStates
));
const
me
=
cloneDeep
(
new
CardArray
(...
cardStates
));
me
.
zone
=
zone
;
me
.
zone
=
zone
;
me
.
getController
=
()
=>
(
matStore
.
selfType
==
1
?
0
:
1
);
me
.
getController
=
()
=>
(
matStore
.
selfType
==
=
1
?
0
:
1
);
const
op
=
cloneDeep
(
new
CardArray
(...
cardStates
));
const
op
=
cloneDeep
(
new
CardArray
(...
cardStates
));
op
.
zone
=
zone
;
op
.
zone
=
zone
;
op
.
getController
=
()
=>
(
matStore
.
selfType
==
1
?
1
:
0
);
op
.
getController
=
()
=>
(
matStore
.
selfType
==
=
1
?
1
:
0
);
const
res
=
proxy
({
const
res
=
proxy
({
me
,
me
,
op
,
op
,
of
:
(
controller
:
number
)
=>
{
of
:
(
controller
:
number
)
=>
res
[
getWhom
(
controller
)],
const
tmp
=
res
[
getWhom
(
controller
)];
tmp
.
__proto__
=
CardArray
.
prototype
;
// 手动修复原型链
return
tmp
;
},
});
});
return
res
;
return
res
;
};
};
...
...
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