Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
787421db
Commit
787421db
authored
Jan 13, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复joyride打包后不显示的问题
parent
ca14fee6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
src/App.tsx
+0
-2
src/components/JoyrideStep/index.tsx
+1
-1
src/layouts/Navbar/Navbar.tsx
+6
-1
No files found.
src/App.tsx
View file @
787421db
...
...
@@ -7,7 +7,6 @@ import { AppRoutes } from './routes/AppRoutes'
import
{
AuthProvider
}
from
'./auth/AuthContext'
import
ToastWrapper
from
'./components/ToastWrapper/ToastWrapper'
import
{
store
}
from
'./store'
import
JoyrideStep
from
'./components/JoyrideStep'
const
App
:
React
.
FC
=
()
=>
{
return
(
...
...
@@ -16,7 +15,6 @@ const App: React.FC = () => {
<
AuthProvider
>
<
Router
basename=
"/sdream-ai"
>
<
MainLayout
>
<
JoyrideStep
/>
<
AppRoutes
/>
</
MainLayout
>
</
Router
>
...
...
src/components/JoyrideStep/index.tsx
View file @
787421db
...
...
@@ -7,7 +7,7 @@ export default function JoyrideStep() {
const
[
run
]
=
useState
(
isMobile
()
&&
!
joyrideLocal
)
const
steps
=
[
{
target
:
'.layoutNavBar
Agent
'
,
target
:
'.layoutNavBar
Joyride
'
,
content
:
'点击logo 解锁更多功能 🎉'
,
},
]
...
...
src/layouts/Navbar/Navbar.tsx
View file @
787421db
...
...
@@ -13,6 +13,7 @@ import { NAV_BAR_ITEMS } from '@/config/nav'
import
{
useAppDispatch
,
useAppSelector
}
from
'@/store/hook'
import
Logo
from
'@/assets/svg/logo.svg?react'
import
{
isMobile
}
from
'@/utils'
import
JoyrideStep
from
'@/components/JoyrideStep'
interface
NavbarProps
{
isHistoryVisible
:
boolean
...
...
@@ -85,9 +86,10 @@ const NavbarBase: React.FC<NavbarProps & WithAuthProps> = ({ isHistoryVisible, c
},
navRef
)
return
(
<>
<
motion
.
nav
ref=
{
navRef
}
className=
"h-full flex-shrink-0 flex flex-col items-center justify-center"
>
{
/* hidden */
}
<
motion
.
div
className=
{
`
${styles.layoutNavBarAgent} rounded-full ${isH5NavVisible ? 'h-[55px] bg-white/40' : 'h-[380px]'} w-[54px] overflow-hidden py-[8px] sm:w-[64px] sm:bg-white gap-[24px] sm:h-auto sm:rounded-3xl sm:flex sm:py-[24px] sm:px-[8px]`
}
>
<
motion
.
div
className=
{
`layoutNavBarJoyride
${styles.layoutNavBarAgent} rounded-full ${isH5NavVisible ? 'h-[55px] bg-white/40' : 'h-[380px]'} w-[54px] overflow-hidden py-[8px] sm:w-[64px] sm:bg-white gap-[24px] sm:h-auto sm:rounded-3xl sm:flex sm:py-[24px] sm:px-[8px]`
}
>
<
NavBarItem
isHistoryVisible=
{
isHistoryVisible
}
onClick=
{
handleClick
}
icon=
{
Logo
}
label=
""
key=
"logo"
type=
{
isMobile
()
?
'logo3'
:
'logo'
}
/>
{
NAV_BAR_ITEMS
.
map
((
item
)
=>
{
...
...
@@ -98,6 +100,9 @@ const NavbarBase: React.FC<NavbarProps & WithAuthProps> = ({ isHistoryVisible, c
<
User
onLogout=
{
handleLogout
}
/>
</
motion
.
div
>
</
motion
.
nav
>
<
JoyrideStep
/>
</>
)
}
...
...
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