开发: 群列表改为隐藏式

This commit is contained in:
zhengw
2023-04-24 15:43:28 +08:00
parent 00a69d5759
commit 3d98c2cf38
2 changed files with 104 additions and 104 deletions

View File

@@ -36,9 +36,7 @@ export const ChatVote: React.FC<IChatItem> = (props) => {
<div key={msg?.voteitem[item]} className={styles.voteitem}>
{msg?.voteitem[item]}
</div>
) : (
<></>
);
) : null;
})
: null}
</div>

View File

@@ -343,11 +343,51 @@ const ChatLogs: React.FC = () => {
return 0;
};
// 删除的联系人/群
const tabContentDel = () => {
if (tabKey == '0') {
return <></>;
} else if (tabKey == '1') {
return (
<div
className={`${styles.delFollowList} ${delFollowListShow ? styles.delFollowListShow : ''}`}
>
<div
className={styles.delFollowListBar}
onClick={() => {
setDelFollowListShow(!delFollowListShow);
}}
>
<span>{checkCustFollowsIsEmpty(0)}</span>
{delFollowListShow ? <UpOutlined /> : <DownOutlined />}
</div>
<div
className={`${styles.delFollowListBox} ${
delFollowListShow ? styles.delFollowListBoxShow : ''
}`}
>
{custFollowsList.map((item, i) => {
return item.state == 1 ? null : custFollowsListItem(item, i);
})}
<div style={{ lineHeight: '34px', color: '#999', textAlign: 'center' }}>
{checkCustFollowsIsEmpty(0) == 0 ? '暂无已删联系人' : ''}
</div>
</div>
</div>
);
} else {
return <></>;
}
};
// const { notification } = App.useApp();
const tabContent = () => {
if (tabKey == '0') {
// 内部联系人
// <div className={styles.chatBBox}>{tabContent()}</div>
return (
<>
{/* 内部联系人 */}
<div className={styles.chatBBox} style={{ display: tabKey == '0' ? 'block' : 'none' }}>
<Spin spinning={loadingInner}>
{innerStaffsList.length
? innerStaffsList.map((item) => {
@@ -403,9 +443,8 @@ const ChatLogs: React.FC = () => {
{checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''}
</div>
</Spin>
);
} else if (tabKey == '1') {
return (
</div>
<div className={styles.chatBBox} style={{ display: tabKey == '1' ? 'block' : 'none' }}>
<Spin spinning={loadingOuter}>
{custFollowsList.length
? custFollowsList.map((item, i) => {
@@ -416,9 +455,9 @@ const ChatLogs: React.FC = () => {
{checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''}
</div>
</Spin>
);
} else {
return (
</div>
{tabContentDel()}
<div className={styles.chatBBox} style={{ display: tabKey == '2' ? 'block' : 'none' }}>
<Spin spinning={loadingGroup}>
<GroupListWidget
groupAvatar={avatarObjRef.current}
@@ -438,45 +477,9 @@ const ChatLogs: React.FC = () => {
selectGroup={selectGroup}
/>
</Spin>
</div>
</>
);
}
};
// 删除的联系人/群
const tabContentDel = () => {
if (tabKey == '0') {
return <></>;
} else if (tabKey == '1') {
return (
<div
className={`${styles.delFollowList} ${delFollowListShow ? styles.delFollowListShow : ''}`}
>
<div
className={styles.delFollowListBar}
onClick={() => {
setDelFollowListShow(!delFollowListShow);
}}
>
<span>{checkCustFollowsIsEmpty(0)}</span>
{delFollowListShow ? <UpOutlined /> : <DownOutlined />}
</div>
<div
className={`${styles.delFollowListBox} ${
delFollowListShow ? styles.delFollowListBoxShow : ''
}`}
>
{custFollowsList.map((item, i) => {
return item.state == 1 ? null : custFollowsListItem(item, i);
})}
<div style={{ lineHeight: '34px', color: '#999', textAlign: 'center' }}>
{checkCustFollowsIsEmpty(0) == 0 ? '暂无已删联系人' : ''}
</div>
</div>
</div>
);
} else {
return <></>;
}
};
return (
@@ -610,8 +613,7 @@ const ChatLogs: React.FC = () => {
// }
}}
/>
<div className={styles.chatBBox}>{tabContent()}</div>
{tabContentDel()}
{tabContent()}
</div>
<div style={{ flex: 1 }}>
<div className={styles.logTop}>