فهرست منبع

✨ feat(profile): 添加未登录状态下的导航栏和设置按钮

- 为未登录状态添加导航栏组件,显示"个人中心"标题
- 增加设置图标按钮,点击可打开设置页面
- 优化未登录提示的布局,使用flex布局使元素垂直居中对齐
yourname 4 ماه پیش
والد
کامیت
68436ab173
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      mini/src/pages/profile/index.tsx

+ 6 - 1
mini/src/pages/profile/index.tsx

@@ -107,8 +107,13 @@ const ProfilePage: React.FC = () => {
   if (!userProfile) {
     return (
       <TabBarLayout activeKey="profile">
+        <Navbar
+          title="个人中心"
+          rightIcon="i-heroicons-cog-6-tooth-20-solid"
+          onClickRight={handleSettings}
+        />
         <View className="flex-1 flex items-center justify-center">
-          <View className="text-center">
+          <View className="flex flex-col items-center">
             <View className="i-heroicons-exclamation-circle-20-solid w-12 h-12 text-gray-400 mx-auto mb-4" />
             <Text className="text-gray-600 mb-4">请先登录</Text>
             <Button