下拉隐藏简介等信息,优化超出文本长度交互

This commit is contained in:
2025-11-24 22:42:48 +08:00
parent 78ab8c9a42
commit 31194f67be
7 changed files with 222 additions and 156 deletions

View File

@@ -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>
);
};