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
e0e5c31b
Commit
e0e5c31b
authored
Aug 05, 2024
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 动画
parent
dd531da0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
src/pages/Home/Home.tsx
+2
-2
src/pages/Home/components/QuestionList/QuestionList.tsx
+54
-15
No files found.
src/pages/Home/Home.tsx
View file @
e0e5c31b
...
...
@@ -27,8 +27,8 @@ export const Home: React.FC = () => {
{
/* 欢迎语 */
}
<
div
className=
"gap-[20px] flex justify-center flex-row flex-wrap mt-[42px] sm:mt-[62px] lg:mt-[112px]"
>
<
WelcomeWord
/>
<
QuestionList
title=
"产品问答"
iconImg=
{
HomeIcon1
}
/>
<
QuestionList
title=
"其他问答"
iconImg=
{
HomeIcon2
}
/>
<
QuestionList
dotColor=
"#D4CCFF"
title=
"产品问答"
iconImg=
{
HomeIcon1
}
/>
<
QuestionList
dotColor=
"#CBECFF"
title=
"其他问答"
iconImg=
{
HomeIcon2
}
/>
</
div
>
</
div
>
)
}
...
...
src/pages/Home/components/QuestionList/QuestionList.tsx
View file @
e0e5c31b
import
{
Button
}
from
'@nextui-org/react'
import
type
React
from
'react'
import
{
Image
}
from
'@nextui-org/image'
import
{
motion
}
from
'framer-motion'
interface
QuestionListProps
{
title
:
string
iconImg
:
string
dotColor
:
string
}
export
const
QuestionList
:
React
.
FC
<
QuestionListProps
>
=
({
title
,
iconImg
})
=>
{
const
list
=
{
hidden
:
{
opacity
:
1
,
scale
:
0
},
visible
:
{
opacity
:
1
,
scale
:
1
,
transition
:
{
delayChildren
:
0.2
,
staggerChildren
:
0.1
,
},
},
}
const
item
=
{
hidden
:
{
y
:
20
,
opacity
:
0
},
visible
:
{
y
:
0
,
opacity
:
1
,
},
}
export
const
QuestionList
:
React
.
FC
<
QuestionListProps
>
=
({
dotColor
,
title
,
iconImg
})
=>
{
return
(
<
div
className=
"h-[276px] bg-white box-border px-[20px] py-[24px] rounded-[24px] w-full sm:w-[360px] md:w-[300px]"
>
<
h3
className=
"h-[32px] flex items-center"
>
<
Image
className=
"w-[32px] h-[32px]"
src=
{
iconImg
}
alt=
""
/>
<
span
className=
"text-[18px] ml-[12px] font-medium"
>
{
title
}
</
span
>
</
h3
>
<
ul
className=
"mt-[18px] flex flex-col gap-[8px]"
>
<
li
>
<
motion
.
ul
initial=
"hidden"
animate=
"visible"
variants=
{
list
}
className=
"mt-[18px] flex flex-col gap-[8px]"
>
<
motion
.
li
variants=
{
item
}
>
<
Button
disableRipple
className=
"w-full bg-[#F7FCFF]"
>
<
div
className=
"w-full text-nowrap text-ellipsis overflow-hidden"
>
<
span
className=
"text-[#27353c]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
<
span
style=
{
{
color
:
dotColor
}
}
>
·
</
span
>
<
span
className=
"text-[#27353c] ml-[8px]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
</
div
>
</
Button
>
</
li
>
<
li
>
</
motion
.
li
>
<
motion
.
li
variants=
{
item
}
>
<
Button
disableRipple
className=
"w-full bg-[#F7FCFF]"
>
<
div
className=
"w-full text-nowrap text-ellipsis overflow-hidden"
>
<
span
className=
"text-[#27353c]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
<
span
style=
{
{
color
:
dotColor
}
}
>
·
</
span
>
<
span
className=
"text-[#27353c] ml-[8px]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
</
div
>
</
Button
>
</
li
>
<
li
>
</
motion
.
li
>
<
motion
.
li
variants=
{
item
}
>
<
Button
disableRipple
className=
"w-full bg-[#F7FCFF]"
>
<
div
className=
"w-full text-nowrap text-ellipsis overflow-hidden"
>
<
span
className=
"text-[#27353c]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
<
span
style=
{
{
color
:
dotColor
}
}
>
·
</
span
>
<
span
className=
"text-[#27353c] ml-[8px]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
</
div
>
</
Button
>
</
li
>
<
li
>
</
motion
.
li
>
<
motion
.
li
variants=
{
item
}
>
<
Button
disableRipple
className=
"w-full bg-[#F7FCFF]"
>
<
div
className=
"w-full text-nowrap text-ellipsis overflow-hidden"
>
<
span
className=
"text-[#27353c]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
<
span
style=
{
{
color
:
dotColor
}
}
>
·
</
span
>
<
span
className=
"text-[#27353c] ml-[8px]"
>
推荐几款60周岁还能投的医疗保推荐几款60周岁还能投的医疗保
</
span
>
</
div
>
</
Button
>
</
li
>
</
ul
>
</
motion
.
li
>
</
motion
.
ul
>
</
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