gaoluyang
2026-06-29 27cd042df9aca0383a49f3514bc21958dd890912
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<script setup lang="ts">
import {
  SvgDingDingIcon,
  SvgGithubIcon,
  SvgQQChatIcon,
  SvgWeChatIcon,
} from '../../../../../icons/src';
import { $t } from '../../../../../locales/src';
 
import { VbenIconButton } from '../../../../../@core/ui-kit/shadcn-ui/src';
 
defineOptions({
  name: 'ThirdPartyLogin',
});
 
const emit = defineEmits<{
  thirdLogin: [type: number];
}>();
 
/**
 * 处理第三方登录点击
 *
 * @param type 第三方平台类型
 */
function handleThirdLogin(type: number) {
  emit('thirdLogin', type);
}
</script>
 
<template>
  <div class="w-full sm:mx-auto md:max-w-md">
    <div class="mt-4 flex items-center justify-between">
      <span class="w-[35%] border-b border-input dark:border-gray-600"></span>
      <span class="text-center text-xs text-muted-foreground uppercase">
        {{ $t('authentication.thirdPartyLogin') }}
      </span>
      <span class="w-[35%] border-b border-input dark:border-gray-600"></span>
    </div>
 
    <div class="mt-4 flex flex-wrap justify-center">
      <VbenIconButton class="mb-3" @click="handleThirdLogin(30)">
        <SvgWeChatIcon />
      </VbenIconButton>
      <VbenIconButton class="mb-3" @click="handleThirdLogin(20)">
        <SvgDingDingIcon />
      </VbenIconButton>
      <VbenIconButton class="mb-3" @click="handleThirdLogin(0)">
        <SvgQQChatIcon />
      </VbenIconButton>
      <VbenIconButton class="mb-3" @click="handleThirdLogin(0)">
        <SvgGithubIcon />
      </VbenIconButton>
    </div>
  </div>
</template>