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
c36fc4a1
Commit
c36fc4a1
authored
Jun 08, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
3da7408a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
157 deletions
+137
-157
workspace.xml
.idea/workspace.xml
+97
-128
index.jsx
src/components/LogCard/index.jsx
+4
-4
CommonLayout.jsx
src/layout/CommonLayout.jsx
+12
-22
Backlog.jsx
src/pages/Backlog/Backlog.jsx
+24
-3
No files found.
.idea/workspace.xml
View file @
c36fc4a1
...
...
@@ -2,6 +2,9 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"a6d092de-b4f8-454d-99f5-4dac3ce112e5"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.tmp/"
/>
...
...
@@ -16,78 +19,34 @@
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/
components/LogCard/index
.jsx"
>
<entry
file=
"file://$PROJECT_DIR$/src/
pages/EventProcessing/Process
.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
50
"
>
<caret
line=
"
2"
selection-start-line=
"2"
selection-end-line=
"2
"
/>
<state
relative-caret-position=
"
-627
"
>
<caret
line=
"
79"
column=
"55"
selection-start-line=
"79"
selection-start-column=
"7"
selection-end-line=
"79"
selection-end-column=
"55
"
/>
<folding>
<element
signature=
"e#0#
26
#0"
expanded=
"true"
/>
<element
signature=
"e#0#
49
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/
components/NoticeTab/index
.jsx"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/
pages/Backlog/Backlog
.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
150
"
>
<caret
line=
"
9"
column=
"20"
selection-start-line=
"9"
selection-start-column=
"20"
selection-end-line=
"9"
selection-end-column=
"20
"
/>
<state
relative-caret-position=
"
248
"
>
<caret
line=
"
22"
column=
"37"
selection-start-line=
"22"
selection-start-column=
"25"
selection-end-line=
"22"
selection-end-column=
"37
"
/>
<folding>
<element
signature=
"e#0#
26
#0"
expanded=
"true"
/>
<element
signature=
"e#0#
38
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/components/StepCard/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"50"
>
<caret
line=
"8"
column=
"17"
lean-forward=
"true"
selection-start-line=
"8"
selection-start-column=
"17"
selection-end-line=
"8"
selection-end-column=
"17"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/config-overrides.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-250"
>
<caret
line=
"35"
column=
"9"
lean-forward=
"true"
selection-start-line=
"35"
selection-start-column=
"9"
selection-end-line=
"35"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/package.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-202"
>
<caret
line=
"7"
column=
"29"
selection-start-line=
"7"
selection-start-column=
"29"
selection-end-line=
"7"
selection-end-column=
"29"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/build/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/public/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"600"
>
<caret
line=
"24"
selection-start-line=
"24"
selection-end-line=
"24"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"550"
>
<caret
line=
"25"
column=
"58"
selection-start-line=
"25"
selection-start-column=
"58"
selection-end-line=
"25"
selection-end-column=
"58"
/>
<state
relative-caret-position=
"175"
>
<caret
line=
"7"
column=
"23"
selection-start-line=
"7"
selection-start-column=
"23"
selection-end-line=
"7"
selection-end-column=
"23"
/>
</state>
</provider>
</entry>
...
...
@@ -180,10 +139,8 @@
<option
value=
"$PROJECT_DIR$/src/components/TodoCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/layout/Footer.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/layout/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Communicate/Communicate.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Communicate/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/LogCard/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/router.js"
/>
<option
value=
"$PROJECT_DIR$/src/components/AddressList/index.less"
/>
...
...
@@ -199,6 +156,8 @@
<option
value=
"$PROJECT_DIR$/src/components/TopSearch/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/WorkCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/LogCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/layout/CommonLayout.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
/>
</list>
</option>
...
...
@@ -245,8 +204,7 @@
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"components"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"WorkCard"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"layout"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
...
...
@@ -259,7 +217,13 @@
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"pages"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Backlog"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"EventProcessing"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"utils"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
...
...
@@ -315,12 +279,12 @@
<workItem
from=
"1591406085733"
duration=
"5474000"
/>
<workItem
from=
"1591419899087"
duration=
"268000"
/>
<workItem
from=
"1591493817957"
duration=
"11217000"
/>
<workItem
from=
"1591579020550"
duration=
"2
084
1000"
/>
<workItem
from=
"1591579020550"
duration=
"2
373
1000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"12
365
6000"
/>
<option
name=
"totallyTimeSpent"
value=
"12
654
6000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-8"
y=
"-8"
width=
"1382"
height=
"784"
extended-state=
"6"
/>
...
...
@@ -351,21 +315,6 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"495"
>
<caret
line=
"94"
column=
"20"
selection-start-line=
"94"
selection-start-column=
"20"
selection-end-line=
"94"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"500"
>
<caret
line=
"28"
column=
"80"
selection-start-line=
"28"
selection-start-column=
"80"
selection-end-line=
"28"
selection-end-column=
"80"
/>
<caret
line=
"29"
column=
"80"
selection-start-line=
"29"
selection-start-column=
"80"
selection-end-line=
"29"
selection-end-column=
"80"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Basic.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"198"
>
...
...
@@ -468,16 +417,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/layout/CommonLayout.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"200"
>
<caret
line=
"23"
column=
"13"
selection-start-line=
"23"
selection-start-column=
"13"
selection-end-line=
"23"
selection-end-column=
"13"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/public/img/footer-work.png"
>
<provider
selected=
"true"
editor-type-id=
"images"
/>
</entry>
...
...
@@ -595,16 +534,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1975"
>
<caret
line=
"139"
lean-forward=
"true"
selection-start-line=
"139"
selection-end-line=
"139"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Work/Work.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
...
...
@@ -622,26 +551,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/LogCard/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"50"
>
<caret
line=
"2"
selection-start-line=
"2"
selection-end-line=
"2"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/NoticeTab/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"150"
>
<caret
line=
"9"
column=
"20"
selection-start-line=
"9"
selection-start-column=
"20"
selection-end-line=
"9"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"400"
>
...
...
@@ -694,6 +603,13 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/config-overrides.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
<caret
line=
"35"
column=
"9"
lean-forward=
"true"
selection-start-line=
"35"
selection-start-column=
"9"
selection-end-line=
"35"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/StepCard/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"50"
>
...
...
@@ -704,9 +620,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/build/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/public/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"600"
>
...
...
@@ -714,24 +627,80 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
>
<entry
file=
"file://$PROJECT_DIR$/build/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/NoticeTab/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"550"
>
<caret
line=
"25"
column=
"58"
selection-start-line=
"25"
selection-start-column=
"58"
selection-end-line=
"25"
selection-end-column=
"58"
/>
<state
relative-caret-position=
"150"
>
<caret
line=
"9"
column=
"20"
selection-start-line=
"9"
selection-start-column=
"20"
selection-end-line=
"9"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"675"
>
<caret
line=
"28"
column=
"80"
selection-start-line=
"28"
selection-start-column=
"80"
selection-end-line=
"28"
selection-end-column=
"80"
/>
<caret
line=
"29"
column=
"80"
selection-start-line=
"29"
selection-start-column=
"80"
selection-end-line=
"29"
selection-end-column=
"80"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/LogCard/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-275"
>
<caret
line=
"16"
column=
"35"
selection-start-line=
"16"
selection-start-column=
"35"
selection-end-line=
"16"
selection-end-column=
"35"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/layout/CommonLayout.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"175"
>
<caret
line=
"22"
column=
"21"
lean-forward=
"true"
selection-start-line=
"22"
selection-start-column=
"21"
selection-end-line=
"22"
selection-end-column=
"21"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-627"
>
<caret
line=
"79"
column=
"55"
selection-start-line=
"79"
selection-start-column=
"7"
selection-end-line=
"79"
selection-end-column=
"55"
/>
<folding>
<element
signature=
"e#0#49#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils/instance.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-2141"
>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/package.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-202
"
>
<caret
line=
"7"
column=
"2
9"
selection-start-line=
"7"
selection-start-column=
"29"
selection-end-line=
"7"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"
175
"
>
<caret
line=
"7"
column=
"2
3"
selection-start-line=
"7"
selection-start-column=
"23"
selection-end-line=
"7"
selection-end-column=
"23
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
config-overrides.js
"
>
<entry
file=
"file://$PROJECT_DIR$/
src/pages/Backlog/Backlog.jsx
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-250"
>
<caret
line=
"35"
column=
"9"
lean-forward=
"true"
selection-start-line=
"35"
selection-start-column=
"9"
selection-end-line=
"35"
selection-end-column=
"9"
/>
<state
relative-caret-position=
"248"
>
<caret
line=
"22"
column=
"37"
selection-start-line=
"22"
selection-start-column=
"25"
selection-end-line=
"22"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#0#38#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
src/components/LogCard/index.jsx
View file @
c36fc4a1
...
...
@@ -12,9 +12,9 @@ const Index = (props) => {
className=
"todo-tag-png"
src=
"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591252471425&di=85236ae603ca74553adaca6e8c161a39&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Fb912bf96dc19b3b23530ae2259b60eb6cf70083f6680b-H9l0ri_fw658"
/>
收文管理
{
props
.
TYPE
}
</
div
>
<
p
>
《2020年上级党委文件7号》
</
p
>
<
p
>
{
props
.
TITLE
}
</
p
>
</
div
>
<
span
>
<
img
...
...
@@ -25,8 +25,8 @@ const Index = (props) => {
</
span
>
</
div
>
<
div
className=
"todo-content"
>
<
p
>
当前状态:
排版套头
</
p
>
<
p
style=
{
{
marginTop
:
15
}
}
>
发送人员:
杜莹莹
</
p
>
<
p
>
当前状态:
{
props
.
STATUS
}
</
p
>
<
p
style=
{
{
marginTop
:
15
}
}
>
发送人员:
{
props
.
FROMUSER_ALIASED
}
</
p
>
</
div
>
<
div
className=
"todo-footer"
>
<
div
>
...
...
src/layout/CommonLayout.jsx
View file @
c36fc4a1
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
Footer
from
'./Footer'
import
{
withRouter
}
from
'react-router-dom'
import
'./index.less'
class
CommonLayout
extends
Component
{
constructor
(){
super
();
this
.
resize
=
this
.
resize
.
bind
(
this
)
}
resize
=
(
defaultH
)
=>
{
const
CommonLayout
=
(
props
)
=>
{
const
resize
=
(
defaultH
)
=>
{
const
scrollHeight
=
document
.
body
.
scrollHeight
;
const
footer
=
document
.
getElementById
(
"footer"
);
const
content
=
document
.
getElementById
(
"common-content"
)
...
...
@@ -34,30 +30,24 @@ class CommonLayout extends Component {
}
// alert(`defaultH: ${defaultH} clientHeight: ${scrollHeight}`);
}
componentWillMount
()
{
};
useEffect
(()
=>
{
const
defaultH
=
document
.
body
.
scrollHeight
;
window
.
addEventListener
(
'resize'
,
()
=>
this
.
resize
(
defaultH
))
}
componentWillUnmount
()
{
window
.
addEventListener
(
'resize'
,
this
.
resize
)
}
render
()
{
window
.
addEventListener
(
'resize'
,
()
=>
resize
(
defaultH
));
return
()
=>
window
.
removeEventListener
(
'resize'
,
resize
);
},
[])
return
(
<
div
>
<
div
id=
"common-content"
className=
"common-layout-content"
>
<
div
>
{
this
.
props
.
children
}
{
props
.
children
}
</
div
>
</
div
>
<
Footer
{
...
this
.
props
}
/>
<
Footer
{
..
.
props
}
/>
</
div
>
);
}
}
};
export
default
withRouter
(
CommonLayout
)
;
src/pages/Backlog/Backlog.jsx
View file @
c36fc4a1
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
WhiteSpace
,
WingBlank
,
ActivityIndicator
}
from
'antd-mobile'
import
TodoCard
from
'../../components/LogCard'
import
TopSearch
from
'../../components/TopSearch'
const
Backlog
=
(
props
)
=>
{
const
[
current
,
setCurrent
]
=
useState
()
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
data
,
setData
]
=
useState
([{},{},{},{},{},{}]);
const
checkLog
=
()
=>
{
props
.
history
.
push
(
`/blank/info/example/1`
)
};
//下拉加载
const
handleScroll
=
()
=>
{
const
event
=
document
.
getElementById
(
"common-content"
)
const
top
=
event
.
scrollTop
;
const
scrollHeight
=
event
.
scrollHeight
;
const
clientHeight
=
event
.
clientHeight
;
console
.
log
(
top
,
scrollHeight
,
clientHeight
);
if
(
top
+
clientHeight
===
scrollHeight
)
{
setData
([...
data
,
{},
{},
{},
{},
{},
{}])
// setCurrent(current + 1)
}
};
useEffect
(()
=>
{
window
.
addEventListener
(
'scroll'
,
handleScroll
,
true
);
return
()
=>
window
.
removeEventListener
(
'scroll'
,
handleScroll
,
true
);
},
[])
return
(
<
WingBlank
>
<
ActivityIndicator
...
...
@@ -20,7 +41,7 @@ const Backlog = (props) => {
<
WhiteSpace
/>
<
TopSearch
onSearch=
{
val
=>
console
.
log
(
val
)
}
/>
{
[{},{},{},{},{},{}]
.
map
((
item
,
index
)
=>
(
data
.
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
WhiteSpace
/>
<
TodoCard
data=
{
item
}
onClick=
{
checkLog
}
/>
...
...
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