Merge pull request 'fix:默认图片问题;' (#232) from yws_dev into main
Reviewed-on: #232
This commit is contained in:
commit
8d85ad6ab6
|
@ -5,7 +5,11 @@
|
|||
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
|
||||
<template #reference>
|
||||
<div class="user-info">
|
||||
<el-image class="user-img" :src="img" />
|
||||
<el-image class="user-img" :src="img">
|
||||
<template #error>
|
||||
<img :src="route_path + userStore.user.avatar">
|
||||
</template>
|
||||
</el-image>
|
||||
<span>{{ userStore.user.nickName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -65,6 +69,7 @@ import {toLinkLeftWeb} from "@/utils/tool"
|
|||
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
||||
const route_path = ref(import.meta.env.VITE_APP_BUILD_BASE_PATH)
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const currentRoute = ref('')
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<template>
|
||||
<div class="user-info-head" @click="editCropper()">
|
||||
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
|
||||
<!-- <img :src="options.img" title="点击上传头像" class="img-circle img-lg" /> -->
|
||||
<el-image class="user-img" :src="options.img" style="width: 120px;">
|
||||
<template #error>
|
||||
<img :src="route_path + userStore.user.avatar">
|
||||
</template>
|
||||
</el-image>
|
||||
<el-dialog
|
||||
v-model="open"
|
||||
append-to-body
|
||||
|
@ -31,6 +36,7 @@ const userStore = useUserStore()
|
|||
const open = ref(false)
|
||||
const visible = ref(false)
|
||||
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
||||
const route_path = ref(import.meta.env.VITE_APP_BUILD_BASE_PATH)
|
||||
const defaultImg = ['/img/avatar-default.jpg','/images/img-avatar.png','/src/assets/images/img-avatar.png']
|
||||
|
||||
//图片裁剪数据
|
||||
|
|
Loading…
Reference in New Issue