开发: 群列表改为隐藏式

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}> <div key={msg?.voteitem[item]} className={styles.voteitem}>
{msg?.voteitem[item]} {msg?.voteitem[item]}
</div> </div>
) : ( ) : null;
<></>
);
}) })
: null} : null}
</div> </div>

View File

@@ -343,11 +343,51 @@ const ChatLogs: React.FC = () => {
return 0; 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 { notification } = App.useApp();
const tabContent = () => { const tabContent = () => {
if (tabKey == '0') { // <div className={styles.chatBBox}>{tabContent()}</div>
// 内部联系人
return ( return (
<>
{/* 内部联系人 */}
<div className={styles.chatBBox} style={{ display: tabKey == '0' ? 'block' : 'none' }}>
<Spin spinning={loadingInner}> <Spin spinning={loadingInner}>
{innerStaffsList.length {innerStaffsList.length
? innerStaffsList.map((item) => { ? innerStaffsList.map((item) => {
@@ -403,9 +443,8 @@ const ChatLogs: React.FC = () => {
{checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''} {checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''}
</div> </div>
</Spin> </Spin>
); </div>
} else if (tabKey == '1') { <div className={styles.chatBBox} style={{ display: tabKey == '1' ? 'block' : 'none' }}>
return (
<Spin spinning={loadingOuter}> <Spin spinning={loadingOuter}>
{custFollowsList.length {custFollowsList.length
? custFollowsList.map((item, i) => { ? custFollowsList.map((item, i) => {
@@ -416,9 +455,9 @@ const ChatLogs: React.FC = () => {
{checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''} {checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''}
</div> </div>
</Spin> </Spin>
); </div>
} else { {tabContentDel()}
return ( <div className={styles.chatBBox} style={{ display: tabKey == '2' ? 'block' : 'none' }}>
<Spin spinning={loadingGroup}> <Spin spinning={loadingGroup}>
<GroupListWidget <GroupListWidget
groupAvatar={avatarObjRef.current} groupAvatar={avatarObjRef.current}
@@ -438,45 +477,9 @@ const ChatLogs: React.FC = () => {
selectGroup={selectGroup} selectGroup={selectGroup}
/> />
</Spin> </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 ( return (
@@ -610,8 +613,7 @@ const ChatLogs: React.FC = () => {
// } // }
}} }}
/> />
<div className={styles.chatBBox}>{tabContent()}</div> {tabContent()}
{tabContentDel()}
</div> </div>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<div className={styles.logTop}> <div className={styles.logTop}>