fix: 修复打包后头像图片引用路径出错的问题
This commit is contained in:
@ -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
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user