From e9d741e8874290c739a03ac557131c0743644ab8 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期一, 28 十月 2024 16:21:28 +0800 Subject: [PATCH] 解决时间线,时间展示问题 --- src/views/profile/components/Timeline.vue | 15 +-------------- src/views/profile/index.vue | 8 ++++---- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/views/profile/components/Timeline.vue b/src/views/profile/components/Timeline.vue index 64100ce..b57178f 100644 --- a/src/views/profile/components/Timeline.vue +++ b/src/views/profile/components/Timeline.vue @@ -3,13 +3,11 @@ <el-timeline> <el-timeline-item placement="top" :timestamp="userInfo.lastActiveTime"> <el-card> - <h4>鏈�鍚庢椿鍔ㄦ椂闂�</h4> <p>{{ userInfo.realName+'鍦ㄦ牎鑰冪郴缁熶腑鏈�鍚庢椿鍔ㄤ簡' }}</p> </el-card> </el-timeline-item> <el-timeline-item placement="top" :timestamp="userInfo.createTime"> <el-card> - <h4>鍔犲叆鏃堕棿</h4> <p>{{ userInfo.realName+'鍔犲叆浜嗘牎鑰冪郴缁�' }}</p> </el-card> </el-timeline-item> @@ -20,17 +18,6 @@ <script> export default { - props: { - userInfo: { - type: Object, - default: () => { - return { - realName: '', - lastActiveTime: '', - createTime: '' - } - } - } - } + props: ['userInfo'], } </script> diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue index 93b3147..14435db 100644 --- a/src/views/profile/index.vue +++ b/src/views/profile/index.vue @@ -4,17 +4,17 @@ <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-tabs> </el-card> @@ -49,7 +49,7 @@ created () { let _this = this userApi.getCurrentUser().then(re => { - _this.userInfo = re.response + _this.userInfo = re.data }) } } -- Gitblit v1.8.0