luohairen
2024-11-08 cce9b105726750f1b76eef2fa250680ebf36d06c
src/views/profile/index.vue
@@ -4,17 +4,20 @@
      <el-row :gutter="20">
        <el-col :span="6" :xs="24">
          <user-card  :userInfo="userInfo" />
          <user-card  :user-info="userInfo" />
        </el-col>
        <el-col :span="18" :xs="24">
          <el-card>
            <el-tabs active-name="timeline">
              <el-tab-pane label="时间线" name="timeline">
                <timeline :userInfo="userInfo" />
                <timeline :user-info="userInfo" />
              </el-tab-pane>
              <el-tab-pane label="账号" name="account">
                <account :userInfo="userInfo"  />
                <account :user-info="userInfo"  />
              </el-tab-pane>
              <el-tab-pane label="修改密码" name="editPassword">
                <editPassword :user-info="userInfo" />
              </el-tab-pane>
            </el-tabs>
          </el-card>
@@ -29,6 +32,7 @@
import UserCard from './components/UserCard'
import Timeline from './components/Timeline'
import Account from './components/Account'
import EditPassword from './components/EditPassword'
import userApi from '@/api/user'
export default {
@@ -45,11 +49,11 @@
      }
    }
  },
  components: { UserCard, Timeline, Account },
  components: { UserCard, Timeline, Account, EditPassword },
  created () {
    let _this = this
    userApi.getCurrentUser().then(re => {
      _this.userInfo = re.response
      _this.userInfo = re.data
    })
  }
}