Browse Source

chore: 解决首页img path

master
wangxiang 2 years ago
parent
commit
67e9cca1e8
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 7
      src/views/system/user/sso/index.vue
  2. 10
      src/views/system/user/sso/sso.data.ts

7
src/views/system/user/sso/index.vue

@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
/>
</template>
<template v-else-if="column.key === 'avatar'">
<TableImg :size="60" :simpleShow="true" :imgList="text"/>
<TableImg :size="60" :simpleShow="true" :imgList="getOssImgUrl(text)"/>
</template>
</template>
</BasicTable>
@ -69,6 +69,8 @@ @@ -69,6 +69,8 @@
import SsoModal from './SsoModal.vue';
import { columns, searchFormSchema } from './sso.data';
import { useMessage } from '/@/hooks/web/useMessage';
import { isUrl } from '/@/utils/is';
import { useGlobSetting } from '/@/hooks/setting';
interface TableState {
ids: string[];
@ -94,6 +96,7 @@ @@ -94,6 +96,7 @@
//
multiple: true,
});
const { apiUrl } = useGlobSetting();
const { createConfirm, createMessage } = useMessage();
const [registerModal, { openModal }] = useModal();
const [registerResetPwdModal, { openModal: openResetPwdModal }] = useModal();
@ -124,6 +127,7 @@ @@ -124,6 +127,7 @@
},
handleSearchInfoFn: () => clearSelectedRowKeys()
});
const getOssImgUrl = (url: string) => isUrl(url) ? [url] : [apiUrl + url];
/** 处理多选框选中数据 */
function handleSelectionChange(selection?: Recordable) {
@ -181,6 +185,7 @@ @@ -181,6 +185,7 @@
handleSelectionChange,
handleRefreshTable,
handleResetPassword,
getOssImgUrl
};
}
});

10
src/views/system/user/sso/sso.data.ts

@ -10,16 +10,16 @@ import { SystemUserType } from '/@/enums/permissionEnum'; @@ -10,16 +10,16 @@ import { SystemUserType } from '/@/enums/permissionEnum';
/** 表格列配置 */
export const columns: BasicColumn[] = [
{
title: '用户名',
dataIndex: 'userName',
width: 120
},
{
title: '头像',
dataIndex: 'avatar',
width: 120,
},
{
title: '用户名',
dataIndex: 'userName',
width: 120
},
{
title: '昵称',
dataIndex: 'nickName',

Loading…
Cancel
Save