下拉隐藏简介等信息,优化超出文本长度交互
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
// margin-bottom: 16px;
|
||||
padding: 0 15px;
|
||||
|
||||
// margin-top: 98px;
|
||||
@@ -273,6 +273,7 @@
|
||||
line-height: 1.571em;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
white-space: pre-line;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ const OtherUserPage: React.FC = () => {
|
||||
"hosted"
|
||||
);
|
||||
|
||||
const [collapseProfile, setCollapseProfile] = useState(false);
|
||||
|
||||
// 页面加载时获取用户信息
|
||||
useEffect(() => {
|
||||
const load_user_data = async () => {
|
||||
@@ -211,6 +213,11 @@ const OtherUserPage: React.FC = () => {
|
||||
setActiveTab(tab)
|
||||
}
|
||||
|
||||
const handleScroll = (event: any) => {
|
||||
const scrollData = event.detail;
|
||||
setCollapseProfile(scrollData.scrollTop > 10);
|
||||
}
|
||||
|
||||
// 处理球局详情
|
||||
// const handle_game_detail = (game_id: string) => {
|
||||
// Taro.navigateTo({
|
||||
@@ -219,7 +226,7 @@ const OtherUserPage: React.FC = () => {
|
||||
// };
|
||||
|
||||
return (
|
||||
<View className="other_user_page">
|
||||
<ScrollView scrollY className="other_user_page" onScroll={handleScroll}>
|
||||
{/* <CustomNavbar>
|
||||
<View className="navbar_content">
|
||||
<View className="navbar_back" onClick={() => Taro.navigateBack()}>
|
||||
@@ -251,6 +258,8 @@ const OtherUserPage: React.FC = () => {
|
||||
user_info={user_info}
|
||||
is_current_user={false}
|
||||
is_following={is_following}
|
||||
collapseProfile={collapseProfile}
|
||||
setMarginBottom={false}
|
||||
on_follow={handle_follow}
|
||||
on_message={handle_send_message}
|
||||
onTab={handleOnTab}
|
||||
@@ -344,7 +353,7 @@ const OtherUserPage: React.FC = () => {
|
||||
</View>
|
||||
</View>
|
||||
{/* <GuideBar currentPage="personal" /> */}
|
||||
</View>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user