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
Biluo Shen
Neos
Commits
2f93295d
Commit
2f93295d
authored
Feb 14, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/modal' into 'main'
修复Modal开局弹出的问题 See merge request
mycard/Neos!335
parents
d724a676
6a1bc3c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
package-lock.json
package-lock.json
+6
-6
src/ui/Duel/Message/NeosModal/index.module.scss
src/ui/Duel/Message/NeosModal/index.module.scss
+4
-0
src/ui/Duel/Message/NeosModal/index.tsx
src/ui/Duel/Message/NeosModal/index.tsx
+12
-10
No files found.
package-lock.json
View file @
2f93295d
...
...
@@ -2684,9 +2684,9 @@
}
},
"node_modules/caniuse-lite"
:
{
"version"
:
"1.0.300015
20
"
,
"resolved"
:
"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.300015
20
.tgz"
,
"integrity"
:
"sha512-
tahF5O9EiiTzwTUqAeFjIZbn4Dnqxzz7ktrgGlMYNLH43Ul26IgTMH/zvL3DG0lZxBYnlT04axvInszUsZULd
A=="
,
"version"
:
"1.0.300015
87
"
,
"resolved"
:
"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.300015
87
.tgz"
,
"integrity"
:
"sha512-
HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8UL
A=="
,
"funding"
:
[
{
"type"
:
"opencollective"
,
...
...
@@ -8908,9 +8908,9 @@
"dev"
:
true
},
"caniuse-lite"
:
{
"version"
:
"1.0.300015
20
"
,
"resolved"
:
"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.300015
20
.tgz"
,
"integrity"
:
"sha512-
tahF5O9EiiTzwTUqAeFjIZbn4Dnqxzz7ktrgGlMYNLH43Ul26IgTMH/zvL3DG0lZxBYnlT04axvInszUsZULd
A=="
"version"
:
"1.0.300015
87
"
,
"resolved"
:
"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.300015
87
.tgz"
,
"integrity"
:
"sha512-
HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8UL
A=="
},
"chalk"
:
{
"version"
:
"4.1.2"
,
...
...
src/ui/Duel/Message/NeosModal/index.module.scss
View file @
2f93295d
...
...
@@ -19,6 +19,10 @@
}
}
.hidden
{
visibility
:
hidden
;
}
.wrap
{
pointer-events
:
none
;
}
...
...
src/ui/Duel/Message/NeosModal/index.tsx
View file @
2f93295d
...
...
@@ -5,22 +5,24 @@ import { useEffect, useState } from "react";
import
styles
from
"
./index.module.scss
"
;
interface
Props
extends
ModalProps
{
canBeMinimized
?:
boolean
;
}
export
const
NeosModal
:
React
.
FC
<
Props
>
=
(
props
)
=>
{
const
{
canBeMinimized
=
true
}
=
props
;
export
const
NeosModal
:
React
.
FC
<
ModalProps
>
=
(
props
)
=>
{
const
[
mini
,
setMini
]
=
useState
(
false
);
// 为了修antd的bug,先让isOpen发生变化,再让它变回来
// 为了修antd的bug,先让isOpen发生变化,
同时设置visibility为`hidden`,
再让它变回来
const
[
realOpen
,
setRealOpen
]
=
useState
(
true
);
useEffect
(()
=>
setRealOpen
(
false
),
[]);
const
[
hidden
,
setHidden
]
=
useState
(
true
);
useEffect
(()
=>
{
setRealOpen
(
false
);
setHidden
(
false
);
},
[]);
useEffect
(()
=>
setRealOpen
(
!!
props
.
open
),
[
props
.
open
]);
return
(
<
Modal
className=
{
classNames
(
styles
.
modal
,
{
[
styles
[
"
mini
"
]]:
mini
})
}
className=
{
classNames
(
styles
.
modal
,
{
[
styles
[
"
mini
"
]]:
mini
,
[
styles
[
"
hidden
"
]]:
hidden
,
})
}
centered
maskClosable=
{
true
}
onCancel=
{
()
=>
setMini
(
!
mini
)
}
...
...
@@ -28,7 +30,7 @@ export const NeosModal: React.FC<Props> = (props) => {
bodyStyle=
{
{
padding
:
"
10px 0
"
}
}
mask=
{
!
mini
}
wrapClassName=
{
classNames
({
[
styles
.
wrap
]:
mini
})
}
closable=
{
canBeMinimized
}
closable=
{
true
}
{
...
props
}
open=
{
realOpen
}
/>
...
...
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