Merge branch 'dev-yjw' into 'dev'

fix: 修复打包后头像图片引用路径出错的问题

See merge request itc-framework/ma/2024/front!80
This commit is contained in:
890147
2025-05-29 09:17:18 +00:00
2 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,7 @@
:height="200" :height="200"
:preview="false" :preview="false"
:src="sourceValue" :src="sourceValue"
fallback="src/assets/images/header.jpg" :fallback="headerImg"
/> />
</div> </div>
<a-button <a-button
@ -52,6 +52,7 @@
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import type { ButtonProps } from '/@/components/Button'; import type { ButtonProps } from '/@/components/Button';
import Icon from '/@/components/Icon'; import Icon from '/@/components/Icon';
import headerImg from '/@/assets/images/header.jpg';
const props = { const props = {
width: { type: [String, Number], default: '200px' }, width: { type: [String, Number], default: '200px' },
@ -116,6 +117,7 @@
getImageWrapperStyle, getImageWrapperStyle,
getStyle, getStyle,
handleUploadSuccess, handleUploadSuccess,
headerImg
}; };
}, },
}); });

View File

@ -3,7 +3,7 @@
<span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex"> <span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex">
<span style="border-left: 1px solid rgb(255 255 255 / 30%); height: 30px; padding-right: 15px"></span> <span style="border-left: 1px solid rgb(255 255 255 / 30%); height: 30px; padding-right: 15px"></span>
<div style="margin-right: 12px; height: 30px; margin-top: -10px"> <div style="margin-right: 12px; height: 30px; margin-top: -10px">
<a-image :height="24" :src="getUserInfo.avatar" :width="24" fallback="src/assets/images/header.jpg" /> <a-image :height="24" :src="getUserInfo.avatar" :width="24" :fallback="headerImg" />
</div> </div>
<span :class="`${prefixCls}__info hidden md:block`"> <span :class="`${prefixCls}__info hidden md:block`">
<span :class="`${prefixCls}__name `" class="truncate"> <span :class="`${prefixCls}__name `" class="truncate">
@ -117,7 +117,8 @@
getUserInfo, getUserInfo,
handleMenuClick, handleMenuClick,
register, register,
getUseLockPage getUseLockPage,
headerImg
}; };
}, },
methods: { methods: {