下拉隐藏简介等信息,优化超出文本长度交互
This commit is contained in:
@@ -30,6 +30,8 @@ const MyselfPageContent: React.FC = () => {
|
||||
"hosted"
|
||||
);
|
||||
|
||||
const [collapseProfile, setCollapseProfile] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
pickerOption.getCities();
|
||||
pickerOption.getProfessions();
|
||||
@@ -139,8 +141,13 @@ const MyselfPageContent: React.FC = () => {
|
||||
setActiveTab(tab);
|
||||
};
|
||||
|
||||
const handleScroll = (event: any) => {
|
||||
const scrollData = event.detail;
|
||||
setCollapseProfile(scrollData.scrollTop > 10);
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.myselfPage}>
|
||||
<ScrollView scrollY className={styles.myselfPage} onScroll={handleScroll}>
|
||||
<View
|
||||
className={styles.myselfPageContentMain}
|
||||
style={{ paddingTop: `${totalHeight}px` }}
|
||||
@@ -151,28 +158,33 @@ const MyselfPageContent: React.FC = () => {
|
||||
user_info={user_info}
|
||||
is_current_user={is_current_user}
|
||||
is_following={is_following}
|
||||
collapseProfile={collapseProfile}
|
||||
on_follow={handle_follow}
|
||||
onTab={handleOnTab}
|
||||
/>
|
||||
<View className={styles.quickActionsSection}>
|
||||
<View className={styles.actionCard}>
|
||||
<View className={styles.actionContent} onClick={handle_game_orders}>
|
||||
<Image
|
||||
className={styles.actionIcon}
|
||||
src={require("@/static/userInfo/order_btn.svg")}
|
||||
/>
|
||||
<Text className={styles.actionText}>球局订单</Text>
|
||||
</View>
|
||||
<View className={styles.actionDivider}></View>
|
||||
<View className={styles.actionContent} onClick={handle_wallet}>
|
||||
<Image
|
||||
className={styles.actionIcon}
|
||||
src={require("@/static/userInfo/wallet.svg")}
|
||||
/>
|
||||
<Text className={styles.actionText}>钱包</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{
|
||||
!collapseProfile ?
|
||||
<View className={styles.quickActionsSection}>
|
||||
<View className={styles.actionCard}>
|
||||
<View className={styles.actionContent} onClick={handle_game_orders}>
|
||||
<Image
|
||||
className={styles.actionIcon}
|
||||
src={require("@/static/userInfo/order_btn.svg")}
|
||||
/>
|
||||
<Text className={styles.actionText}>球局订单</Text>
|
||||
</View>
|
||||
<View className={styles.actionDivider}></View>
|
||||
<View className={styles.actionContent} onClick={handle_wallet}>
|
||||
<Image
|
||||
className={styles.actionIcon}
|
||||
src={require("@/static/userInfo/wallet.svg")}
|
||||
/>
|
||||
<Text className={styles.actionText}>钱包</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View> :
|
||||
null
|
||||
}
|
||||
</View>
|
||||
|
||||
<View className={styles.testEntryCardBox}>
|
||||
@@ -188,9 +200,8 @@ const MyselfPageContent: React.FC = () => {
|
||||
<Text className={styles.tabText}>我主办的</Text>
|
||||
</View>
|
||||
<View
|
||||
className={`${styles.tabItem} ${
|
||||
active_tab === "participated" ? styles.active : ""
|
||||
}`}
|
||||
className={`${styles.tabItem} ${active_tab === "participated" ? styles.active : ""
|
||||
}`}
|
||||
onClick={() => setActiveTab("participated")}
|
||||
>
|
||||
<Text className={styles.tabText}>我参与的</Text>
|
||||
@@ -211,7 +222,7 @@ const MyselfPageContent: React.FC = () => {
|
||||
btnImg="ICON_ADD"
|
||||
reload={goPublish}
|
||||
isShowNoData={game_records.length === 0}
|
||||
loadMoreMatches={() => {}}
|
||||
loadMoreMatches={() => { }}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: 0, overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
@@ -230,7 +241,7 @@ const MyselfPageContent: React.FC = () => {
|
||||
error={null}
|
||||
errorImg="ICON_LIST_EMPTY"
|
||||
isShowNoData={ended_game_records.length === 0}
|
||||
loadMoreMatches={() => {}}
|
||||
loadMoreMatches={() => { }}
|
||||
collapse={true}
|
||||
style={{ paddingBottom: "90px", overflow: "hidden" }}
|
||||
listLoadErrorHeight="320px"
|
||||
@@ -239,7 +250,7 @@ const MyselfPageContent: React.FC = () => {
|
||||
</ScrollView>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user