Commit f124542a authored by 熊成伟's avatar 熊成伟

debug

parent c36fc4a1
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="a6d092de-b4f8-454d-99f5-4dac3ce112e5" name="Default Changelist" comment=""> <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$/.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" /> <change beforePath="$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/Notice/Notice.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/Notice/Notice.jsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/Work/Work.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/Work/Work.jsx" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.tmp/" /> <ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" /> <ignored path="$PROJECT_DIR$/temp/" />
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"> <entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-627"> <state relative-caret-position="423">
<caret line="79" column="55" selection-start-line="79" selection-start-column="7" selection-end-line="79" selection-end-column="55" /> <caret line="49" column="49" selection-start-line="49" selection-start-column="41" selection-end-line="49" selection-end-column="49" />
<folding> <folding>
<element signature="e#0#49#0" expanded="true" /> <element signature="e#0#49#0" expanded="true" />
</folding> </folding>
...@@ -33,10 +33,31 @@ ...@@ -33,10 +33,31 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"> <entry file="file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="248"> <state relative-caret-position="375">
<caret line="22" column="37" selection-start-line="22" selection-start-column="25" selection-end-line="22" selection-end-column="37" /> <caret line="42" column="29" selection-start-line="42" selection-start-column="29" selection-end-line="42" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#38#0" expanded="true" /> <element signature="e#0#49#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="12" column="27" lean-forward="true" selection-start-line="12" selection-start-column="27" selection-end-line="12" selection-end-column="27" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/utils/instance.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="350">
<caret line="41" column="32" selection-start-line="41" selection-start-column="32" selection-end-line="41" selection-end-column="32" />
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -51,14 +72,26 @@ ...@@ -51,14 +72,26 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/pages/Work/Work.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="100">
<caret line="37" column="29" lean-forward="true" selection-start-line="37" selection-start-column="29" selection-end-line="37" selection-end-column="29" />
<folding>
<element signature="e#0#40#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
<option value="JavaScript File" />
<option value="Less File" /> <option value="Less File" />
<option value="React jsx" /> <option value="React jsx" />
<option value="JavaScript File" />
</list> </list>
</option> </option>
</component> </component>
...@@ -108,7 +141,6 @@ ...@@ -108,7 +141,6 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/src/components/List/index.jsx" />
<option value="$PROJECT_DIR$/src/Pages/EventProcessing/Adjunct.jsx" /> <option value="$PROJECT_DIR$/src/Pages/EventProcessing/Adjunct.jsx" />
<option value="$PROJECT_DIR$/src/Pages/EventProcessing/Option.jsx" /> <option value="$PROJECT_DIR$/src/Pages/EventProcessing/Option.jsx" />
<option value="$PROJECT_DIR$/src/Pages/EventProcessing/Flow.jsx" /> <option value="$PROJECT_DIR$/src/Pages/EventProcessing/Flow.jsx" />
...@@ -147,10 +179,8 @@ ...@@ -147,10 +179,8 @@
<option value="$PROJECT_DIR$/src/components/AddressList/index.jsx" /> <option value="$PROJECT_DIR$/src/components/AddressList/index.jsx" />
<option value="$PROJECT_DIR$/src/pages/EventProcessing/SubmitDetail.jsx" /> <option value="$PROJECT_DIR$/src/pages/EventProcessing/SubmitDetail.jsx" />
<option value="$PROJECT_DIR$/src/pages/AddressList/index.less" /> <option value="$PROJECT_DIR$/src/pages/AddressList/index.less" />
<option value="$PROJECT_DIR$/src/pages/Notice/Notice.jsx" />
<option value="$PROJECT_DIR$/src/pages/EventProcessing/Pro.jsx" /> <option value="$PROJECT_DIR$/src/pages/EventProcessing/Pro.jsx" />
<option value="$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx" /> <option value="$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx" />
<option value="$PROJECT_DIR$/src/pages/Work/Work.jsx" />
<option value="$PROJECT_DIR$/src/components/NoticeTab/index.jsx" /> <option value="$PROJECT_DIR$/src/components/NoticeTab/index.jsx" />
<option value="$PROJECT_DIR$/src/components/StepCard/index.jsx" /> <option value="$PROJECT_DIR$/src/components/StepCard/index.jsx" />
<option value="$PROJECT_DIR$/src/components/TopSearch/index.jsx" /> <option value="$PROJECT_DIR$/src/components/TopSearch/index.jsx" />
...@@ -158,6 +188,9 @@ ...@@ -158,6 +188,9 @@
<option value="$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx" /> <option value="$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx" />
<option value="$PROJECT_DIR$/src/components/LogCard/index.jsx" /> <option value="$PROJECT_DIR$/src/components/LogCard/index.jsx" />
<option value="$PROJECT_DIR$/src/layout/CommonLayout.jsx" /> <option value="$PROJECT_DIR$/src/layout/CommonLayout.jsx" />
<option value="$PROJECT_DIR$/src/pages/Work/Work.jsx" />
<option value="$PROJECT_DIR$/src/utils/urlQuery.js" />
<option value="$PROJECT_DIR$/src/pages/Notice/Notice.jsx" />
<option value="$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx" /> <option value="$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx" />
</list> </list>
</option> </option>
...@@ -200,6 +233,13 @@ ...@@ -200,6 +233,13 @@
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="components" type="462c0819:PsiDirectoryNode" /> <item name="components" type="462c0819:PsiDirectoryNode" />
</path> </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="components" type="462c0819:PsiDirectoryNode" />
<item name="TopSearch" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="create-react-app" type="b2602c69:ProjectViewProjectNode" /> <item name="create-react-app" type="b2602c69:ProjectViewProjectNode" />
<item name="create-react-app" type="462c0819:PsiDirectoryNode" /> <item name="create-react-app" type="462c0819:PsiDirectoryNode" />
...@@ -212,6 +252,13 @@ ...@@ -212,6 +252,13 @@
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="pages" type="462c0819:PsiDirectoryNode" /> <item name="pages" type="462c0819:PsiDirectoryNode" />
</path> </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="pages" type="462c0819:PsiDirectoryNode" />
<item name="Backlog" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="create-react-app" type="b2602c69:ProjectViewProjectNode" /> <item name="create-react-app" type="b2602c69:ProjectViewProjectNode" />
<item name="create-react-app" type="462c0819:PsiDirectoryNode" /> <item name="create-react-app" type="462c0819:PsiDirectoryNode" />
...@@ -279,12 +326,12 @@ ...@@ -279,12 +326,12 @@
<workItem from="1591406085733" duration="5474000" /> <workItem from="1591406085733" duration="5474000" />
<workItem from="1591419899087" duration="268000" /> <workItem from="1591419899087" duration="268000" />
<workItem from="1591493817957" duration="11217000" /> <workItem from="1591493817957" duration="11217000" />
<workItem from="1591579020550" duration="23731000" /> <workItem from="1591579020550" duration="31796000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="126546000" /> <option name="totallyTimeSpent" value="134611000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="784" extended-state="6" /> <frame x="-8" y="-8" width="1382" height="784" extended-state="6" />
...@@ -315,33 +362,6 @@ ...@@ -315,33 +362,6 @@
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Basic.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="25" column="12" selection-start-line="25" selection-start-column="12" selection-end-line="25" selection-end-column="12" />
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Flow.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="5" column="12" selection-start-line="5" selection-start-column="12" selection-end-line="5" selection-end-column="12" />
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/components/Adjunct/index.less">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="520">
<caret line="22" column="20" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/components/Adjunct/index.jsx"> <entry file="file://$PROJECT_DIR$/src/components/Adjunct/index.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-125"> <state relative-caret-position="-125">
...@@ -365,16 +385,6 @@ ...@@ -365,16 +385,6 @@
<entry file="file://$PROJECT_DIR$/src/resize.js"> <entry file="file://$PROJECT_DIR$/src/resize.js">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/layout/BlankLayout.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175">
<caret line="7" column="14" lean-forward="true" selection-start-line="7" selection-start-column="14" selection-end-line="7" selection-end-column="14" />
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/index.css"> <entry file="file://$PROJECT_DIR$/src/index.css">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="475"> <state relative-caret-position="475">
...@@ -534,23 +544,6 @@ ...@@ -534,23 +544,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/pages/Work/Work.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="50">
<caret line="5" selection-start-line="5" selection-end-line="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx"> <entry file="file://$PROJECT_DIR$/src/components/WorkCard/CardItem.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400"> <state relative-caret-position="400">
...@@ -593,16 +586,6 @@ ...@@ -593,16 +586,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/components/TopSearch/index.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="14" column="25" lean-forward="true" selection-start-line="14" selection-start-column="25" selection-end-line="14" selection-end-column="25" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config-overrides.js"> <entry file="file://$PROJECT_DIR$/config-overrides.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125"> <state relative-caret-position="125">
...@@ -658,48 +641,96 @@ ...@@ -658,48 +641,96 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/layout/CommonLayout.jsx"> <entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175"> <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" /> <caret line="7" column="23" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
</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="100">
<caret line="37" column="29" lean-forward="true" selection-start-line="37" selection-start-column="29" selection-end-line="37" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#49#0" expanded="true" /> <element signature="e#0#40#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"> <entry file="file://$PROJECT_DIR$/src/utils/urlQuery.js">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/components/TopSearch/index.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175">
<caret line="10" column="18" selection-start-line="10" selection-start-column="18" selection-end-line="10" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/utils/utils.jsx">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/utils/request.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="350">
<caret line="14" column="15" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/utils/instance.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="350">
<caret line="41" column="32" selection-start-line="41" selection-start-column="32" selection-end-line="41" selection-end-column="32" />
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/pages/Notice/Notice.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-627"> <state relative-caret-position="225">
<caret line="79" column="55" selection-start-line="79" selection-start-column="7" selection-end-line="79" selection-end-column="55" /> <caret line="12" column="27" lean-forward="true" selection-start-line="12" selection-start-column="27" selection-end-line="12" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/layout/CommonLayout.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="148">
<caret line="41" column="35" selection-start-line="41" selection-start-column="21" selection-end-line="41" selection-end-column="35" />
<folding> <folding>
<element signature="e#0#49#0" expanded="true" /> <element signature="e#0#49#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/utils/instance.js"> <entry file="file://$PROJECT_DIR$/src/layout/BlankLayout.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2141"> <state relative-caret-position="175">
<caret line="7" column="14" lean-forward="true" selection-start-line="7" selection-start-column="14" selection-end-line="7" selection-end-column="14" />
<folding> <folding>
<element signature="e#0#26#0" expanded="true" /> <element signature="e#0#26#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/package.json"> <entry file="file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175"> <state relative-caret-position="423">
<caret line="7" column="23" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" /> <caret line="49" column="49" selection-start-line="49" selection-start-column="41" selection-end-line="49" selection-end-column="49" />
<folding>
<element signature="e#0#49#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"> <entry file="file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="248"> <state relative-caret-position="375">
<caret line="22" column="37" selection-start-line="22" selection-start-column="25" selection-end-line="22" selection-end-column="37" /> <caret line="42" column="29" selection-start-line="42" selection-start-column="29" selection-end-line="42" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#38#0" expanded="true" /> <element signature="e#0#49#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
......
...@@ -4,7 +4,8 @@ import TodoCard from '../../components/LogCard' ...@@ -4,7 +4,8 @@ import TodoCard from '../../components/LogCard'
import TopSearch from '../../components/TopSearch' import TopSearch from '../../components/TopSearch'
const Backlog = (props) => { const Backlog = (props) => {
const [current, setCurrent] = useState() const [current, setCurrent] = useState(1);
const [searchWord, setSearchWord] = useState()
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
...@@ -13,6 +14,13 @@ const Backlog = (props) => { ...@@ -13,6 +14,13 @@ const Backlog = (props) => {
const checkLog = () => { const checkLog = () => {
props.history.push(`/blank/info/example/1`) props.history.push(`/blank/info/example/1`)
}; };
const getData = () => {
setLoading(false)
const pageMap ={searchWord, nowPage: current, pageSize: 10}
let result = data.concat([{}, {}, {}, {}, {}, {}])
setData(result)
setCurrent(current + 1)
};
//下拉加载 //下拉加载
const handleScroll = () => { const handleScroll = () => {
...@@ -20,15 +28,19 @@ const Backlog = (props) => { ...@@ -20,15 +28,19 @@ const Backlog = (props) => {
const top = event.scrollTop; const top = event.scrollTop;
const scrollHeight = event.scrollHeight; const scrollHeight = event.scrollHeight;
const clientHeight = event.clientHeight; const clientHeight = event.clientHeight;
console.log(top, scrollHeight, clientHeight);
if (top + clientHeight === scrollHeight) { if (top + clientHeight === scrollHeight) {
setData([...data, {}, {}, {}, {}, {}, {}]) setLoading(true);
// setCurrent(current + 1) getData()
} }
}; };
useEffect(() => { useEffect(() => {
window.addEventListener('scroll', handleScroll, true); window.addEventListener('scroll', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true); return () => window.removeEventListener('scroll', handleScroll, true);
}, [data]);
useEffect(() => {
const element = document.getElementById('common-content')
element.scrollTo(0, 0)
}, []) }, [])
return ( return (
...@@ -39,7 +51,7 @@ const Backlog = (props) => { ...@@ -39,7 +51,7 @@ const Backlog = (props) => {
animating={loading} animating={loading}
/> />
<WhiteSpace/> <WhiteSpace/>
<TopSearch onSearch={val => console.log(val)}/> <TopSearch onSearch={setSearchWord}/>
{ {
data.map((item, index) => ( data.map((item, index) => (
<div key={index}> <div key={index}>
......
import React, {useState} from 'react'; import React, {useEffect, useState} from 'react';
import {ActivityIndicator, WhiteSpace, WingBlank} from 'antd-mobile' import {ActivityIndicator, WhiteSpace, WingBlank} from 'antd-mobile'
import TodoCard from '../../components/LogCard' import TodoCard from '../../components/LogCard'
import TopNotice from '../../components/NoticeTab' import TopNotice from '../../components/NoticeTab'
const Notice = (props) => { const Notice = (props) => {
const [loading, setLoading] = useState(false) const [loading, setLoading] = useState(false);
const [current, setCurrent] = useState(1);
const [searchWord, setSearchWord] = useState()
const [data, setData] = useState([{},{},{},{},{},{}]);
const getData = () => {
setLoading(false)
const pageMap ={searchWord, nowPage: current, pageSize: 10}
let result = data.concat([{}, {}, {}, {}, {}, {}])
setData(result)
setCurrent(current + 1)
};
//下拉加载
const handleScroll = () => {
const event = document.getElementById("common-content")
const top = event.scrollTop;
const scrollHeight = event.scrollHeight;
const clientHeight = event.clientHeight;
if (top + clientHeight === scrollHeight) {
setLoading(true);
getData()
}
};
useEffect(() => {
window.addEventListener('scroll', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true);
}, [data]);
const checkLog = () => {
props.history.push(`/blank/info/example/1`)
};
return ( return (
<WingBlank> <WingBlank>
<ActivityIndicator <ActivityIndicator
...@@ -15,8 +46,15 @@ const Notice = (props) => { ...@@ -15,8 +46,15 @@ const Notice = (props) => {
/> />
<WhiteSpace/> <WhiteSpace/>
<TopNotice/> <TopNotice/>
<WhiteSpace/> {
<TodoCard/> data.map((item, index) => (
<div key={index}>
<WhiteSpace/>
<TodoCard data={item} onClick={checkLog}/>
</div>
))
}
</WingBlank> </WingBlank>
); );
}; };
......
...@@ -16,36 +16,21 @@ const Work = () => { ...@@ -16,36 +16,21 @@ const Work = () => {
const commonEdit = () => { const commonEdit = () => {
setAddStatus(!addStatus); setAddStatus(!addStatus);
}; };
const workSearch = (val) => { const workSearch = (val) => {
console.log(val) console.log(val)
}; };
const itemAdd = (id, arr, arr2) => { const itemAdd = (id, arr, arr2) => {
// const item = arr2.filter(item => item.id === id); // const item = arr2.filter(item => item.id === id);
// arr.splice(arr.length - 1, 0, item[0]); // arr.splice(arr.length - 1, 0, item[0]);
}; };
const itemSlice = (id, arr, arr2) => { const itemSlice = (id, arr, arr2) => {
// const index = arr.findIndex(item => item.id == id); // const index = arr.findIndex(item => item.id == id);
// index > -1 && arr.splice(index, 1); // index > -1 && arr.splice(index, 1);
}; };
//测试数据
const data222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name${i}`,
icon: '/img/test/test.png',
text: `name${i}`,
}));
const data22222 = Array.from(new Array(7)).map((_val, i) => ({
id: `name2${i}`,
icon: '/img/test/test-1.png',
text: `name${i}`,
}));
console.log(data);
return ( return (
<WingBlank> <WingBlank>
<ActivityIndicator <ActivityIndicator
...@@ -56,15 +41,6 @@ const Work = () => { ...@@ -56,15 +41,6 @@ const Work = () => {
<WhiteSpace/> <WhiteSpace/>
<TopSearch onSearch={ workSearch }/> <TopSearch onSearch={ workSearch }/>
<WhiteSpace/> <WhiteSpace/>
<WorkCard
type="edit"
title="常用板块"
addCommon={ commonEdit }
addStatus={addStatus}
data={data222}
iconAction={ itemSlice }
/>
<WhiteSpace/>
<WorkCard <WorkCard
title="事物管理" title="事物管理"
addCommon={ commonEdit } addCommon={ commonEdit }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment