From 67e9cca1e861e41a1823585f8bd7f4836eb26976 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Sun, 6 Aug 2023 04:26:42 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=A7=A3=E5=86=B3=E9=A6=96=E9=A1=B5im?= =?UTF-8?q?g=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/sso/index.vue | 7 ++++++- src/views/system/user/sso/sso.data.ts | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/system/user/sso/index.vue b/src/views/system/user/sso/index.vue index 0605c0f..6eb7454 100644 --- a/src/views/system/user/sso/index.vue +++ b/src/views/system/user/sso/index.vue @@ -44,7 +44,7 @@ /> @@ -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 @@ // 非多个禁用 multiple: true, }); + const { apiUrl } = useGlobSetting(); const { createConfirm, createMessage } = useMessage(); const [registerModal, { openModal }] = useModal(); const [registerResetPwdModal, { openModal: openResetPwdModal }] = useModal(); @@ -124,6 +127,7 @@ }, handleSearchInfoFn: () => clearSelectedRowKeys() }); + const getOssImgUrl = (url: string) => isUrl(url) ? [url] : [apiUrl + url]; /** 处理多选框选中数据 */ function handleSelectionChange(selection?: Recordable) { @@ -181,6 +185,7 @@ handleSelectionChange, handleRefreshTable, handleResetPassword, + getOssImgUrl }; } }); diff --git a/src/views/system/user/sso/sso.data.ts b/src/views/system/user/sso/sso.data.ts index 449b1ad..54ac300 100644 --- a/src/views/system/user/sso/sso.data.ts +++ b/src/views/system/user/sso/sso.data.ts @@ -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',