|
@@ -1,5 +1,6 @@
|
|
|
import React, { useState, useEffect } from 'react'
|
|
import React, { useState, useEffect } from 'react'
|
|
|
-import { List, Avatar, Tag, Skeleton, Divider } from 'antd'
|
|
|
|
|
|
|
+import { List, Avatar, Tag, Skeleton, Divider, Button } from 'antd'
|
|
|
|
|
+import { Plus } from '@icon-park/react'
|
|
|
import InfiniteScroll from 'react-infinite-scroll-component'
|
|
import InfiniteScroll from 'react-infinite-scroll-component'
|
|
|
import { queryMessage } from '@/services/staff'
|
|
import { queryMessage } from '@/services/staff'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
@@ -41,8 +42,14 @@ const Notification = () => {
|
|
|
initData({ current: state.current + 1 })
|
|
initData({ current: state.current + 1 })
|
|
|
}
|
|
}
|
|
|
return (
|
|
return (
|
|
|
- <div className="bg-hex-ffffff rounded-md px-6 pb-6">
|
|
|
|
|
|
|
+ <div className="bg-hex-ffffff rounded-md px-6 pb-6 relative">
|
|
|
<h4 className="py-4 text-xl">通知中心</h4>
|
|
<h4 className="py-4 text-xl">通知中心</h4>
|
|
|
|
|
+ <div className="absolute top-4 right-6">
|
|
|
|
|
+ <Button type="primary">
|
|
|
|
|
+ <Plus className="mr-1" />
|
|
|
|
|
+ 新建通知
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </div>
|
|
|
<div id="scrollableDiv" style={{ height: 'calc(100vh - 125px - 3.5rem)', overflowY: 'auto' }}>
|
|
<div id="scrollableDiv" style={{ height: 'calc(100vh - 125px - 3.5rem)', overflowY: 'auto' }}>
|
|
|
<InfiniteScroll
|
|
<InfiniteScroll
|
|
|
dataLength={state.total}
|
|
dataLength={state.total}
|
|
@@ -50,8 +57,7 @@ const Notification = () => {
|
|
|
hasMore={state.hasMore}
|
|
hasMore={state.hasMore}
|
|
|
loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
|
|
loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
|
|
|
endMessage={<Divider plain>别再滚啦,已是尽头</Divider>}
|
|
endMessage={<Divider plain>别再滚啦,已是尽头</Divider>}
|
|
|
- scrollableTarget="scrollableDiv"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ scrollableTarget="scrollableDiv">
|
|
|
<List
|
|
<List
|
|
|
itemLayout="horizontal"
|
|
itemLayout="horizontal"
|
|
|
// pagination={{ pageSize: 5 }}
|
|
// pagination={{ pageSize: 5 }}
|