perf: 邮件目录保持展开的树; style: MailBox title

dev/ckeditor
Lei OT 2 weeks ago
parent 812bf19c26
commit 88958977c4

@ -195,7 +195,6 @@ export const getMailboxCountAction = async (params = { opi_sn: '' }, update = fa
Object.keys(result).map(dirKey => {
_MapDir.set(Number(dirKey), {..._MapDir.get(Number(dirKey)), count: result[dirKey]});
})
console.log(_MapDir, '_MapDir')
const _newToUpdate = Array.from(_MapDir.values());
const _MapRoot = new Map((readCacheDir?.tree || []).map((obj) => [obj.key, obj]))
_newToUpdate.forEach((row) => {

@ -122,7 +122,7 @@ function Follow() {
useEffect(() => {
const first = currentMailboxDEI || accountDEI[0].value
const opi = accountListDEIMapped[first].OPI_SN
setExpandTree([`${opi}-today`, `${opi}-todo`, `search-orders`, ...[mailboxActiveNode?.VParent || []]])
setExpandTree(prev => [...prev, ...[`${opi}-today`, `${opi}-todo`, `search-orders`, ...[mailboxActiveNode?.VParent || []]]])
return () => {}
}, [currentMailboxDEI, mailboxNestedDirsActive, mailboxActiveNode])
@ -152,7 +152,7 @@ function Follow() {
titleRender={(node) => (
<Typography.Text ellipsis={{ tooltip: node.title }} className={`${node?._raw?.IsSuccess === 1 ? 'text-primary' : ''}`}>
{node.title}
<Badge size={'small'} count={node.count} offset={[3, 0]} style={{backgroundColor: "transparent", color: '#1ba784'}} overflowCount={999} />
<Badge size={'small'} count={node.count} offset={[3, 0]} style={{backgroundColor: "#1ba784", color1: '#1ba784'}} overflowCount={999} />
</Typography.Text>
)}
/>

@ -206,7 +206,7 @@ const MailBox = ({ mailboxDir, onMailItemClick, ...props }) => {
<List
loading={loading}
header={
<Flex align='center' justify='space-between'>
<Flex align='center' justify='space-between' wrap >
<Breadcrumb
items={props.breadcrumb.map((bc) => {
return {
@ -219,7 +219,7 @@ const MailBox = ({ mailboxDir, onMailItemClick, ...props }) => {
}
})}
/>
<Flex align='center' justify='space-between'>
<Flex align='center' justify='space-between' className='ml-auto' >
<span>已选: {selectedItems.length} </span>
<span>
{(pagination.current - 1) * PAGE_SIZE + 1}-{Math.min(pagination.current * PAGE_SIZE, pagination.total)} of {pagination.total}

Loading…
Cancel
Save