chore: default avatar
This commit is contained in:
parent
a448ff8115
commit
ddf90ec4a8
@ -3,7 +3,7 @@ import type { UserProfile } from '#/api/system/profile/model';
|
||||
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { usePreferences } from '@vben/preferences';
|
||||
import { preferences, usePreferences } from '@vben/preferences';
|
||||
|
||||
import {
|
||||
Card,
|
||||
@ -24,9 +24,7 @@ defineEmits<{
|
||||
}>();
|
||||
|
||||
const avatar = computed(
|
||||
() =>
|
||||
props.profile?.user.avatar ??
|
||||
'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
|
||||
() => props.profile?.user.avatar ?? preferences.app.defaultAvatar,
|
||||
);
|
||||
|
||||
const { isDark } = usePreferences();
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
type VbenFormProps,
|
||||
} from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import {
|
||||
@ -122,7 +123,6 @@ const gridOptions: VxeGridProps = {
|
||||
align: 'center',
|
||||
showOverflow: true,
|
||||
};
|
||||
|
||||
const checked = ref(false);
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
@ -236,10 +236,7 @@ function handleResetPwd(record: Recordable<any>) {
|
||||
</template>
|
||||
<template #avatar="{ row }">
|
||||
<Avatar v-if="row.avatar" :src="row.avatar" />
|
||||
<Avatar
|
||||
v-else
|
||||
src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
|
||||
/>
|
||||
<Avatar v-else :src="preferences.app.defaultAvatar" />
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
<TableSwitch
|
||||
|
Loading…
Reference in New Issue
Block a user