feat: 第三方登录离线图标
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { createIconifyIcon } from '@vben/icons';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Col, Row, Tooltip } from 'ant-design-vue';
|
||||
@@ -31,7 +30,7 @@ const clientList = accountBindList.filter((item) => item.action);
|
||||
<Tooltip :title="`${item.title}登录`">
|
||||
<span class="flex cursor-pointer items-center justify-center">
|
||||
<component
|
||||
:is="createIconifyIcon(item.avatar)"
|
||||
:is="item.avatar"
|
||||
v-if="item.avatar"
|
||||
:style="{ color: item.color }"
|
||||
class="size-[24px]"
|
||||
|
@@ -1,3 +1,13 @@
|
||||
import type { Component } from 'vue';
|
||||
|
||||
import {
|
||||
AlipayIcon,
|
||||
DingdingIcon,
|
||||
GiteeIcon,
|
||||
GithubOAuthIcon,
|
||||
TaobaoIcon,
|
||||
} from '@vben/icons';
|
||||
|
||||
import { authBinding } from '#/api/core/auth';
|
||||
/**
|
||||
* @description: 菜单
|
||||
@@ -13,7 +23,7 @@ export interface ListItem {
|
||||
title: string;
|
||||
description: string;
|
||||
extra?: string;
|
||||
avatar?: string;
|
||||
avatar?: Component;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
@@ -50,7 +60,7 @@ async function handleAuthBinding(source: string) {
|
||||
*/
|
||||
export const accountBindList: BindItem[] = [
|
||||
{
|
||||
avatar: 'ri:taobao-fill',
|
||||
avatar: TaobaoIcon,
|
||||
color: '#ff4000',
|
||||
description: '绑定淘宝账号',
|
||||
key: '1',
|
||||
@@ -58,7 +68,7 @@ export const accountBindList: BindItem[] = [
|
||||
title: '淘宝',
|
||||
},
|
||||
{
|
||||
avatar: 'fa-brands:alipay',
|
||||
avatar: AlipayIcon,
|
||||
color: '#2eabff',
|
||||
description: '绑定支付宝账号',
|
||||
key: '2',
|
||||
@@ -66,7 +76,7 @@ export const accountBindList: BindItem[] = [
|
||||
title: '支付宝',
|
||||
},
|
||||
{
|
||||
avatar: 'ri:dingding-fill',
|
||||
avatar: DingdingIcon,
|
||||
color: '#2eabff',
|
||||
description: '绑定钉钉账号',
|
||||
key: '3',
|
||||
@@ -75,7 +85,7 @@ export const accountBindList: BindItem[] = [
|
||||
},
|
||||
{
|
||||
action: () => handleAuthBinding('gitee'),
|
||||
avatar: 'simple-icons:gitee',
|
||||
avatar: GiteeIcon,
|
||||
color: '#c71d23',
|
||||
description: '绑定GITEE账号',
|
||||
key: '4',
|
||||
@@ -84,7 +94,7 @@ export const accountBindList: BindItem[] = [
|
||||
},
|
||||
{
|
||||
action: () => handleAuthBinding('github'),
|
||||
avatar: 'uiw:github',
|
||||
avatar: GithubOAuthIcon,
|
||||
color: '',
|
||||
description: '绑定GITHUB账号',
|
||||
key: '5',
|
||||
|
@@ -5,8 +5,6 @@ import type { SocialInfo } from '#/api/system/social/model';
|
||||
|
||||
import { computed, onMounted, ref, unref } from 'vue';
|
||||
|
||||
import { createIconifyIcon } from '@vben/icons';
|
||||
|
||||
import {
|
||||
Alert,
|
||||
Avatar,
|
||||
@@ -127,7 +125,7 @@ onMounted(reload);
|
||||
<div class="flex w-full items-center gap-4">
|
||||
<div>
|
||||
<component
|
||||
:is="createIconifyIcon(item.avatar)"
|
||||
:is="item.avatar"
|
||||
v-if="item.avatar"
|
||||
:style="{ color: item.color }"
|
||||
class="size-[40px]"
|
||||
|
Reference in New Issue
Block a user