Skip to content

Commit

Permalink
fix: 修复依赖缺失及 lock 文件不一致错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Apr 21, 2024
1 parent 4a63a50 commit 3d09037
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"vue": "^3.4.21",
"vue-codemirror6": "^1.1.27",
"vue-color-kit": "^1.0.5",
"vue-cropper": "^0.6.4",
"vue-draggable-plus": "^0.3.5",
"vue-echarts": "^6.5.5",
"vue-json-pretty": "^2.4.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/stores/modules/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { resetHasRouteFlag } from '@/router/permission'
import getAvatar from '@/utils/avatar'

const storeSetup = () => {
const userInfo = reactive<Pick<UserInfo, 'nickname' | 'avatar' | 'email' | 'phone' | 'registrationDate'>>({
const userInfo = reactive<Pick<UserInfo, 'id' | 'nickname' | 'avatar' | 'email' | 'phone' | 'registrationDate'>>({
id: '',
nickname: '',
avatar: '',
email: '',
Expand Down Expand Up @@ -67,6 +68,7 @@ const storeSetup = () => {
// 获取用户信息
const getInfo = async () => {
const res = await getUserInfoApi()
userInfo.id = res.data.id
userInfo.nickname = res.data.nickname
userInfo.avatar = getAvatar(res.data.avatar, res.data.gender)
userInfo.email = res.data.email
Expand Down
4 changes: 2 additions & 2 deletions src/views/setting/profile/LeftBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<div class="body">
<section>
<div class="avatar">
<img src="https://q1.itc.cn/q_70/images03/20240320/fcf023d835c54f78bac6c7efc98fbb4c.jpeg" />
<img :src="userStore.avatar" alt="avatar" />
</div>
<div class="name">
<span style="margin-right: 10px">{{ userInfo.nickname }}</span>
<icon-edit :size="16" class="btn" @click="onEditNickName" />
</div>
<div class="id">
<GiSvgIcon name="id" :size="16" />
<span style="margin-left: 10px">88888888</span>
<span style="margin-left: 10px">{{ userInfo.id }}</span>
</div>
</section>
<footer>
Expand Down

0 comments on commit 3d09037

Please sign in to comment.