Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB_StrongestBrain_250520
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
RB_StrongestBrain_250520
Commits
e1399463
Commit
e1399463
authored
May 21, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5
parent
3d705934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
GamePage.tsx
src/pages/GamePage/GamePage.tsx
+5
-1
TipPanel.tsx
src/panels/TipPanel/TipPanel.tsx
+5
-6
No files found.
src/pages/GamePage/GamePage.tsx
View file @
e1399463
...
...
@@ -19,6 +19,7 @@ import.meta.env.DEV && initDevtools({});
import
bgImg
from
"../../assets/GamePage/bg.jpg"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
TipPanel
from
"@/panels/TipPanel/TipPanel.tsx"
;
import
{
LevelArr
}
from
"@/pages/GamePage/Level/LevelConfig.ts"
;
export
function
getApp
():
Application
{
return
window
[
"__app"
];
...
...
@@ -103,6 +104,10 @@ class GamePage extends React.Component<any, any> {
}
clickTip
=
()
=>
{
const
{
levelIndex
,
levelIdxArr
}
=
gameStore
.
gameInfo
;
const
levelIdx
=
levelIdxArr
[
levelIndex
];
const
{
tip
,
cls
}
=
LevelArr
[
levelIdx
];
ModalCtrl
.
showModal
(
TipPanel
,
{
tip
});
}
render
()
{
...
...
@@ -110,7 +115,6 @@ class GamePage extends React.Component<any, any> {
const
{
levelIndex
,
levelIdxArr
}
=
gameStore
.
gameInfo
;
const
titleIdx
=
levelIdxArr
[
levelIndex
]
+
1
;
console
.
log
(
titleIdx
)
return
<
div
className=
{
styles
.
root
}
ref=
{
(
el
)
=>
this
.
gameDiv
=
el
}
>
...
...
src/panels/TipPanel/TipPanel.tsx
View file @
e1399463
...
...
@@ -2,11 +2,10 @@ import React from "react";
import
{
observer
}
from
"mobx-react"
;
import
"./TipPanel.less"
;
import
{
Button
}
from
"@grace/ui"
;
import
{
_asyncThrottle
}
from
"@/utils/utils.ts"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
export
interface
ITipPanelProps
{
level
:
number
;
tip
:
string
;
}
@
observer
...
...
@@ -24,13 +23,13 @@ class TipPanel extends React.Component<ITipPanelProps> {
};
render
()
{
const
{
level
}
=
this
.
props
;
console
.
log
(
level
);
const
{
tip
}
=
this
.
props
;
return
<
div
className=
"TipPanel modal_center"
>
<
div
className=
"bg"
/>
<
div
className=
"text"
>
5=1
</
div
>
<
div
className=
"text"
dangerouslySetInnerHTML=
{
{
__html
:
tip
,
}
}
/>
<
Button
className=
"btn"
onClick=
{
this
.
clickBtn
}
/>
<
Button
className=
"close"
onClick=
{
this
.
clickClose
}
/>
</
div
>;
...
...
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