Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend
Project
Project
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
Schedules
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
h5-communicate
frontend
Commits
b4711eeb
Commit
b4711eeb
authored
Jun 08, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
6ee4303b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
20 deletions
+72
-20
workspace.xml
.idea/workspace.xml
+0
-0
footer-work-s.png
public/img/footer-work-s.png
+0
-0
footer-work.png
public/img/footer-work.png
+0
-0
report.20200606.164659.17716.0.001.json
report.20200606.164659.17716.0.001.json
+0
-0
CommonLayout.jsx
src/layout/CommonLayout.jsx
+55
-12
Footer.jsx
src/layout/Footer.jsx
+1
-2
index.less
src/layout/index.less
+9
-1
Backlog.jsx
src/pages/Backlog/Backlog.jsx
+7
-5
No files found.
.idea/workspace.xml
View file @
b4711eeb
This diff is collapsed.
Click to expand it.
public/img/footer-work-s.png
View replaced file @
6ee4303b
View file @
b4711eeb
2.45 KB
|
W:
|
H:
2.66 KB
|
W:
|
H:
2-up
Swipe
Onion skin
public/img/footer-work.png
View replaced file @
6ee4303b
View file @
b4711eeb
1.59 KB
|
W:
|
H:
1.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
report.20200606.164659.17716.0.001.json
deleted
100644 → 0
View file @
6ee4303b
This diff is collapsed.
Click to expand it.
src/layout/CommonLayout.jsx
View file @
b4711eeb
import
React
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Footer
from
'./Footer'
import
Footer
from
'./Footer'
import
{
withRouter
}
from
'react-router-dom'
import
{
withRouter
}
from
'react-router-dom'
import
'./index.less'
import
'./index.less'
const
CommonLayout
=
(
props
)
=>
{
return
(
<
div
>
<
div
className=
"common-layout-content"
>
<
div
>
{
props
.
children
}
</
div
>
class
CommonLayout
extends
Component
{
constructor
(){
super
();
this
.
resize
=
this
.
resize
.
bind
(
this
)
}
resize
=
(
defaultH
)
=>
{
const
scrollHeight
=
document
.
body
.
scrollHeight
;
const
footer
=
document
.
getElementById
(
"footer"
);
const
content
=
document
.
getElementById
(
"common-content"
)
if
(
footer
)
{
if
(
defaultH
>
scrollHeight
)
{
footer
.
classList
.
remove
(
'footer'
);
footer
.
classList
.
add
(
'footer-static'
)
}
else
{
footer
.
classList
.
add
(
'footer'
)
footer
.
classList
.
remove
(
'footer-static'
);
}
}
if
(
content
)
{
if
(
defaultH
>
scrollHeight
)
{
content
.
classList
.
remove
(
'common-layout-content'
);
content
.
classList
.
add
(
'common-layout-content-static'
);
}
else
{
content
.
classList
.
add
(
'common-layout-content'
);
content
.
classList
.
remove
(
'common-layout-content-static'
);
}
}
// alert(`defaultH: ${defaultH} clientHeight: ${scrollHeight}`);
}
componentWillMount
()
{
const
defaultH
=
document
.
body
.
scrollHeight
;
window
.
addEventListener
(
'resize'
,
()
=>
this
.
resize
(
defaultH
))
}
componentWillUnmount
()
{
window
.
addEventListener
(
'resize'
,
this
.
resize
)
}
render
()
{
return
(
<
div
>
<
div
id=
"common-content"
className=
"common-layout-content"
>
<
div
>
{
this
.
props
.
children
}
</
div
>
</
div
>
<
Footer
{
...
this
.
props
}
/>
</
div
>
</
div
>
<
Footer
{
...
props
}
/>
);
</
div
>
}
);
}
};
export
default
withRouter
(
CommonLayout
)
;
export
default
withRouter
(
CommonLayout
)
;
src/layout/Footer.jsx
View file @
b4711eeb
...
@@ -25,13 +25,12 @@ class Footer extends Component {
...
@@ -25,13 +25,12 @@ class Footer extends Component {
];
];
return
(
return
(
<
div
className=
"footer"
>
<
div
id=
"footer"
className=
"footer"
>
<
TabBar
<
TabBar
unselectedTintColor=
"#949494"
unselectedTintColor=
"#949494"
tintColor=
"#2E67EA"
tintColor=
"#2E67EA"
barTintColor=
"white"
barTintColor=
"white"
>
>
{
tabItem
.
map
(
item
=>
(
{
tabItem
.
map
(
item
=>
(
<
TabBar
.
Item
<
TabBar
.
Item
key=
{
item
.
key
}
key=
{
item
.
key
}
...
...
src/layout/index.less
View file @
b4711eeb
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
overflow: auto;
overflow: auto;
padding-bottom: 10px
padding-bottom: 10px
}
}
.common-layout-content-static{
position: fixed;
top: 0;left: 0;right: 0;bottom: 10px;
overflow: auto;
}
.footer-tab-icon{
.footer-tab-icon{
width: 18px;
width: 18px;
...
@@ -15,7 +20,10 @@
...
@@ -15,7 +20,10 @@
background: rgba(35,35,35, 0.5);
background: rgba(35,35,35, 0.5);
}
}
.footer{
.footer{
width: 100%;
position: fixed;
position: fixed;
width: 100%;
bottom: 0;
bottom: 0;
}
}
.footer-static{
display: none;
}
src/pages/Backlog/Backlog.jsx
View file @
b4711eeb
...
@@ -3,16 +3,18 @@ import {WhiteSpace, WingBlank, ActivityIndicator} from 'antd-mobile'
...
@@ -3,16 +3,18 @@ import {WhiteSpace, WingBlank, ActivityIndicator} from 'antd-mobile'
import
TodoCard
from
'../../components/TodoCard'
import
TodoCard
from
'../../components/TodoCard'
import
TopSearch
from
'../../components/TopSearch'
import
TopSearch
from
'../../components/TopSearch'
class
Index
extends
Component
{
class
Index
extends
Component
{
state
=
{
constructor
(){
loading
:
false
super
();
}
this
.
state
=
{
loading
:
false
};
};
checkLog
=
()
=>
{
checkLog
=
()
=>
{
this
.
props
.
history
.
push
(
`/blank/example/1`
)
this
.
props
.
history
.
push
(
`/blank/example/1`
)
}
}
render
()
{
render
()
{
const
{
loading
}
=
this
.
state
const
{
loading
}
=
this
.
state
;
return
(
return
(
<
WingBlank
>
<
WingBlank
>
<
ActivityIndicator
<
ActivityIndicator
...
...
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