Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web2022
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
web2022
Commits
c803a76a
Commit
c803a76a
authored
Aug 03, 2022
by
mxm-web-develop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
da5e090a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
15 deletions
+9
-15
EventsScrollView.tsx
src/components/EventsScrollView.tsx
+0
-1
index.tsx
src/components/Navbar/index.tsx
+3
-4
ScrollView.tsx
src/components/ScrollView.tsx
+0
-2
AppProvider.tsx
src/store/AppProvider.tsx
+4
-2
index.tsx
src/store/index.tsx
+0
-4
EventItem.tsx
src/views/About/Memorabilia/EventItem.tsx
+2
-2
No files found.
src/components/EventsScrollView.tsx
View file @
c803a76a
...
@@ -47,7 +47,6 @@ export const EventsScrollView = (props: ScrollViewType) => {
...
@@ -47,7 +47,6 @@ export const EventsScrollView = (props: ScrollViewType) => {
BScroll
.
use
(
NestedScroll
);
BScroll
.
use
(
NestedScroll
);
const
{
wrapHeight
,
children
}
=
props
;
const
{
wrapHeight
,
children
}
=
props
;
const
wrapRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
wrapRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
[
dots
,
setDots
]
=
useState
(
0
)
const
[
scrollObj
,
setScrollObj
]
=
useState
<
BScrollConstructor
<
{}
>>
();
const
[
scrollObj
,
setScrollObj
]
=
useState
<
BScrollConstructor
<
{}
>>
();
const
[
currentPage
,
setCurrentPage
]
=
useState
(
0
)
const
[
currentPage
,
setCurrentPage
]
=
useState
(
0
)
...
...
src/components/Navbar/index.tsx
View file @
c803a76a
...
@@ -68,10 +68,7 @@ const HoverLink = () =>{
...
@@ -68,10 +68,7 @@ const HoverLink = () =>{
export
default
function
Navbar
(
props
:
IAppProps
)
{
export
default
function
Navbar
(
props
:
IAppProps
)
{
const
{
pathname
}
=
useLocation
()
const
{
pathname
}
=
useLocation
()
const
{
data
}
=
React
.
useContext
(
AppContext
)
const
{
data
}
=
React
.
useContext
(
AppContext
)
React
.
useEffect
(()
=>
{
console
.
log
(
22222
);
},[
data
.
theme
])
return
(
return
(
<
nav
className=
'flex min-w-[1440px] justify-between absolute px-[120px] w-full top-0 z-[99999] py-6 text-sm text-[#061E3B] font-normal '
>
<
nav
className=
'flex min-w-[1440px] justify-between absolute px-[120px] w-full top-0 z-[99999] py-6 text-sm text-[#061E3B] font-normal '
>
<
div
className=
'left '
>
<
div
className=
'left '
>
...
@@ -84,6 +81,8 @@ export default function Navbar (props: IAppProps) {
...
@@ -84,6 +81,8 @@ export default function Navbar (props: IAppProps) {
<
Link
to=
'news'
className=
{
`hover:text-theme-blue ${pathname ==='/news'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
新闻动态
</
Link
>
<
Link
to=
'news'
className=
{
`hover:text-theme-blue ${pathname ==='/news'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
新闻动态
</
Link
>
{
/* <Link to='classes' className={`hover: text-theme-dark ${pathname ==='/classes'?' text-theme-dark':'text-[#061E3B] font-normal'}`}>公开课</Link> */
}
{
/* <Link to='classes' className={`hover: text-theme-dark ${pathname ==='/classes'?' text-theme-dark':'text-[#061E3B] font-normal'}`}>公开课</Link> */
}
<
Link
to=
'about'
className=
{
`hover:text-theme-blue ${pathname ==='/about'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
关于我们
</
Link
>
<
Link
to=
'about'
className=
{
`hover:text-theme-blue ${pathname ==='/about'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
关于我们
</
Link
>
<
div
>
{
data
.
theme
}
</
div
>
</
div
>
</
div
>
{
/* <div className='right flex-grow-0'>
{
/* <div className='right flex-grow-0'>
toolbar
toolbar
...
...
src/components/ScrollView.tsx
View file @
c803a76a
...
@@ -105,8 +105,6 @@ export const ScrollView = (props: ScrollViewType) => {
...
@@ -105,8 +105,6 @@ export const ScrollView = (props: ScrollViewType) => {
return
prevState
return
prevState
})
})
scrollObj
&&
scrollObj
.
on
(
'slidePageChanged'
,
(
page
:
any
)
=>
{
scrollObj
&&
scrollObj
.
on
(
'slidePageChanged'
,
(
page
:
any
)
=>
{
console
.
log
(
'slidePageChanged'
,
2332131231
);
setCurrentPage
((
prevState
:
number
)
=>
{
setCurrentPage
((
prevState
:
number
)
=>
{
if
(
prevState
!==
page
.
pageY
){
if
(
prevState
!==
page
.
pageY
){
dispatch
({
type
:
'slideOnChange'
,
payload
:{
pageIndex
:
page
.
pageY
}})
dispatch
({
type
:
'slideOnChange'
,
payload
:{
pageIndex
:
page
.
pageY
}})
...
...
src/store/AppProvider.tsx
View file @
c803a76a
...
@@ -21,11 +21,12 @@ const AppReducer = (state:typeof data,action:Actions)=>{
...
@@ -21,11 +21,12 @@ const AppReducer = (state:typeof data,action:Actions)=>{
switch
(
type
){
switch
(
type
){
case
'slideOnChange'
:
case
'slideOnChange'
:
state
.
pageIndex
=
payload
.
pageIndex
state
.
pageIndex
=
payload
.
pageIndex
if
(
state
.
currentPage
===
'/chain33'
&&
state
.
pageIndex
===
1
&&
state
.
theme
===
'light'
){
if
(
state
.
currentPage
===
'/chain33'
&&
state
.
pageIndex
===
1
){
state
.
theme
=
'dark'
state
.
theme
=
'dark'
}
else
{
}
else
{
state
.
theme
=
'light'
state
.
theme
=
'light'
}
}
break
;
break
;
case
'routerOnChange'
:
case
'routerOnChange'
:
state
.
currentPage
=
payload
.
currentPage
state
.
currentPage
=
payload
.
currentPage
...
@@ -33,6 +34,7 @@ const AppReducer = (state:typeof data,action:Actions)=>{
...
@@ -33,6 +34,7 @@ const AppReducer = (state:typeof data,action:Actions)=>{
}
}
console
.
log
(
state
);
console
.
log
(
state
);
return
state
return
state
}
}
...
...
src/store/index.tsx
deleted
100644 → 0
View file @
da5e090a
export
{
}
\ No newline at end of file
src/views/About/Memorabilia/EventItem.tsx
View file @
c803a76a
...
@@ -66,10 +66,10 @@ export const EventItem = (props: EventItemType) => {
...
@@ -66,10 +66,10 @@ export const EventItem = (props: EventItemType) => {
{
data
?
data
.
title
:
""
}
{
data
?
data
.
title
:
""
}
</
div
>
</
div
>
</
div
>
</
div
>
{
open
&&
data
&&
data
.
title
.
length
>
42
&&
(
{
open
&&
data
&&
data
.
title
.
length
>
37
&&
(
<
div
<
div
ref=
{
floating
}
ref=
{
floating
}
className=
"bg-theme-dark content-1-cn z-[9999
99
] text-white py-5 px-3 w-[260px] rounded-md break-all"
className=
"bg-theme-dark content-1-cn z-[9999] text-white py-5 px-3 w-[260px] rounded-md break-all"
style=
{
{
style=
{
{
position
:
strategy
,
position
:
strategy
,
top
:
y
??
0
,
top
:
y
??
0
,
...
...
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