Blame view

Yi.Vben5.Vue3/docs/src/en/guide/in-depth/login.md 2.37 KB
515fceeb   “wangming”   框架初始化
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
  # Login
  
  This document explains how to customize the login page of your application.
  
  ## Login Page Adjustment
  
  If you want to adjust the title, description, icon, and toolbar of the login page, you can do so by configuring the `props` parameter of the `AuthPageLayout` component.
  
  ![login](/guide/login.png)
  
  You just need to configure the `props` parameter of `AuthPageLayout` in `src/router/routes/core.ts` within your application:
  
  ```ts {4-8}
   {
      component: AuthPageLayout,
      props: {
        sloganImage: "xxx/xxx.png",
        pageTitle: "开箱即用的大型中后台管理系统",
        pageDescription: "工程化、高性能、跨组件库的前端模版",
        toolbar: true,
        toolbarList: ['color', 'language', 'layout', 'theme'],
      }
      // ...
    },
  ```
  
  ::: tip
  
  If these configurations do not meet your needs, you can implement your own login page. Simply implement your own `AuthPageLayout`.
  
  :::
  
  ## Login Form Adjustment
  
  If you want to adjust the content of the login form, you can configure the `AuthenticationLogin` component parameters in `src/views/_core/authentication/login.vue` within your application:
  
  ```vue
  <AuthenticationLogin
    :loading="authStore.loginLoading"
    @submit="authStore.authLogin"
  />
  ```
  
  ::: details AuthenticationLogin Component Props
  
  ```ts
  {
    /**
     * @en Verification code login path
     */
    codeLoginPath?: string;
    /**
     * @en Forget password path
     */
    forgetPasswordPath?: string;
  
    /**
     * @en Whether it is in loading state
     */
    loading?: boolean;
  
    /**
     * @en QR code login path
     */
    qrCodeLoginPath?: string;
  
    /**
     * @en Registration path
     */
    registerPath?: string;
  
    /**
     * @en Whether to show verification code login
     */
    showCodeLogin?: boolean;
    /**
     * @en Whether to show forget password
     */
    showForgetPassword?: boolean;
  
    /**
     * @en Whether to show QR code login
     */
    showQrcodeLogin?: boolean;
  
    /**
     * @en Whether to show registration button
     */
    showRegister?: boolean;
  
    /**
     * @en Whether to show remember account
     */
    showRememberMe?: boolean;
  
    /**
     * @en Whether to show third-party login
     */
    showThirdPartyLogin?: boolean;
  
    /**
     * @en Login box subtitle
     */
    subTitle?: string;
  
    /**
     * @en Login box title
     */
    title?: string;
  }
  ```
  
  :::
  
  ::: tip
  
  If these configurations do not meet your needs, you can implement your own login form and related login logic.
  
  :::