@pisell/private-materials 3.4.44 → 3.4.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +150 -164
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/addons/model.d.ts +1 -10
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  14. package/es/components/booking/info/model.d.ts +1 -10
  15. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/info/service2/utils.d.ts +1 -1
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/model.d.ts +1 -10
  20. package/es/components/booking/payments/model.d.ts +1 -10
  21. package/es/components/booking/utils.d.ts +2 -2
  22. package/es/components/eftposPay/amount.d.ts +1 -1
  23. package/es/components/eftposPay/device.d.ts +1 -1
  24. package/es/components/eftposPay/hooks.d.ts +2 -2
  25. package/es/components/eftposPay/store/index.d.ts +4 -4
  26. package/es/components/pay/toC/index.js +23 -20
  27. package/es/components/pay/toC/model.d.ts +1 -9
  28. package/es/components/schedules/model.d.ts +1 -9
  29. package/es/components/wallet/Detail/model.d.ts +1 -13
  30. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  31. package/es/components/wallet/PointCard/model.d.ts +1 -13
  32. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  33. package/es/components/wallet/Voucher/model.d.ts +1 -13
  34. package/es/components/wallet/model.d.ts +1 -9
  35. package/es/index.d.ts +1 -0
  36. package/es/index.js +2 -1
  37. package/es/pro/Login2.0/AuthModal.d.ts +143 -0
  38. package/es/pro/Login2.0/AuthModal.js +630 -0
  39. package/es/pro/Login2.0/Login2.d.ts +61 -0
  40. package/es/pro/Login2.0/Login2.js +2235 -0
  41. package/es/pro/Login2.0/Register2.d.ts +65 -0
  42. package/es/pro/Login2.0/Register2.js +1501 -0
  43. package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
  44. package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
  45. package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  46. package/es/pro/Login2.0/components/LegalTerms.js +51 -0
  47. package/es/pro/Login2.0/components/LegalTerms.less +74 -0
  48. package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
  49. package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
  50. package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
  51. package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
  52. package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
  53. package/es/pro/Login2.0/components/PhoneInput.js +414 -0
  54. package/es/pro/Login2.0/components/PhoneInput.less +148 -0
  55. package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
  56. package/es/pro/Login2.0/components/phoneValidation.js +228 -0
  57. package/es/pro/Login2.0/hooks/index.d.ts +2 -0
  58. package/es/pro/Login2.0/hooks/index.js +1 -0
  59. package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
  60. package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
  61. package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  62. package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
  63. package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  64. package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
  65. package/es/pro/Login2.0/index.js +8 -0
  66. package/es/pro/Login2.0/index.less +1002 -0
  67. package/es/pro/Login2.0/locales.d.ts +543 -0
  68. package/es/pro/Login2.0/locales.js +622 -0
  69. package/es/pro/Login2.0/shared/Header.d.ts +11 -0
  70. package/es/pro/Login2.0/shared/Header.js +42 -0
  71. package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  72. package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
  73. package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
  74. package/es/pro/Login2.0/shared/registerFlow.js +171 -0
  75. package/es/pro/Login2.0/shared/types.d.ts +232 -0
  76. package/es/pro/Login2.0/shared/types.js +1 -0
  77. package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
  78. package/es/pro/Login2.0/steps/CodeInput.js +209 -0
  79. package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
  80. package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
  81. package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
  82. package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
  83. package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
  84. package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
  85. package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
  86. package/es/pro/Login2.0/steps/SetPassword.js +148 -0
  87. package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
  88. package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
  89. package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
  90. package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
  91. package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
  92. package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
  93. package/es/pro/Login2.0/steps/index.d.ts +19 -0
  94. package/es/pro/Login2.0/steps/index.js +11 -0
  95. package/es/pro/Login2.0/steps/steps.less +423 -0
  96. package/es/pro/Login2.0/types.d.ts +167 -0
  97. package/es/pro/Login2.0/types.js +1 -0
  98. package/lib/components/booking/addons/model.d.ts +1 -10
  99. package/lib/components/booking/forms/model.d.ts +1 -10
  100. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  101. package/lib/components/booking/info/model.d.ts +1 -10
  102. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  103. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  104. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  105. package/lib/components/booking/model.d.ts +1 -9
  106. package/lib/components/booking/notes/model.d.ts +1 -10
  107. package/lib/components/booking/payments/model.d.ts +1 -10
  108. package/lib/components/booking/utils.d.ts +2 -2
  109. package/lib/components/eftposPay/amount.d.ts +1 -1
  110. package/lib/components/eftposPay/device.d.ts +1 -1
  111. package/lib/components/eftposPay/hooks.d.ts +2 -2
  112. package/lib/components/eftposPay/store/index.d.ts +4 -4
  113. package/lib/components/pay/toC/index.js +9 -1
  114. package/lib/components/pay/toC/model.d.ts +1 -9
  115. package/lib/components/schedules/model.d.ts +1 -9
  116. package/lib/components/wallet/Detail/model.d.ts +1 -13
  117. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  118. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  119. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  120. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  121. package/lib/components/wallet/model.d.ts +1 -9
  122. package/lib/index.d.ts +1 -0
  123. package/lib/index.js +7 -0
  124. package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
  125. package/lib/pro/Login2.0/AuthModal.js +503 -0
  126. package/lib/pro/Login2.0/Login2.d.ts +61 -0
  127. package/lib/pro/Login2.0/Login2.js +1544 -0
  128. package/lib/pro/Login2.0/Register2.d.ts +65 -0
  129. package/lib/pro/Login2.0/Register2.js +1062 -0
  130. package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
  131. package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
  132. package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  133. package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
  134. package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
  135. package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
  136. package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
  137. package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
  138. package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
  139. package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
  140. package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
  141. package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
  142. package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
  143. package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
  144. package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
  145. package/lib/pro/Login2.0/hooks/index.js +29 -0
  146. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
  147. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
  148. package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  149. package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
  150. package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  151. package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
  152. package/lib/pro/Login2.0/index.js +45 -0
  153. package/lib/pro/Login2.0/index.less +1002 -0
  154. package/lib/pro/Login2.0/locales.d.ts +543 -0
  155. package/lib/pro/Login2.0/locales.js +646 -0
  156. package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
  157. package/lib/pro/Login2.0/shared/Header.js +81 -0
  158. package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  159. package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
  160. package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
  161. package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
  162. package/lib/pro/Login2.0/shared/types.d.ts +232 -0
  163. package/lib/pro/Login2.0/shared/types.js +17 -0
  164. package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
  165. package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
  166. package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
  167. package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
  168. package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
  169. package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
  170. package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
  171. package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
  172. package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
  173. package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
  174. package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
  175. package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
  176. package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
  177. package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
  178. package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
  179. package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
  180. package/lib/pro/Login2.0/steps/index.d.ts +19 -0
  181. package/lib/pro/Login2.0/steps/index.js +60 -0
  182. package/lib/pro/Login2.0/steps/steps.less +423 -0
  183. package/lib/pro/Login2.0/types.d.ts +167 -0
  184. package/lib/pro/Login2.0/types.js +17 -0
  185. package/lowcode/authmodal/meta.ts +395 -0
  186. package/lowcode/login2/CONFIG.md +447 -0
  187. package/lowcode/login2/TEST_CONFIG.md +324 -0
  188. package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
  189. package/lowcode/login2/meta.ts +560 -0
  190. package/lowcode/login2/snippets.ts +124 -0
  191. package/lowcode/register2/meta.ts +562 -0
  192. package/lowcode/register2/snippets.ts +257 -0
  193. package/package.json +5 -5
@@ -0,0 +1,447 @@
1
+ # Login2 配置说明
2
+
3
+ ## 必填配置
4
+
5
+ ### loginMethods(登录方式列表)
6
+
7
+ **必填**,数组类型,数组顺序决定显示顺序,第一项为默认登录方式。
8
+
9
+ #### 邮箱登录
10
+
11
+ ```json
12
+ {
13
+ "type": "email",
14
+ "verificationMethods": ["password", "verification_code"],
15
+ "stepByStep": false
16
+ }
17
+ ```
18
+
19
+ **参数说明:**
20
+ - `type`: `"email"` (必填)
21
+ - `verificationMethods`: 验证方式数组,第一项为默认方式
22
+ - `"password"` - 密码登录
23
+ - `"verification_code"` - 验证码登录
24
+ - 可以只配置一种:`["password"]` 或 `["verification_code"]`
25
+ - 配置多种时,用户可以在界面下方的 "OR" 区域切换验证方式
26
+ - 例如:`["password", "verification_code"]` 默认显示密码登录,下方显示"Email code to xxx"切换按钮
27
+ - `stepByStep`: 是否分步骤登录(仅对密码登录有效)
28
+ - `true` - 先输入邮箱,再输入密码
29
+ - `false` - 邮箱和密码在同一页面(默认)
30
+
31
+ #### 手机登录
32
+
33
+ ```json
34
+ {
35
+ "type": "phone",
36
+ "verificationMethods": ["verification_code", "password"],
37
+ "stepByStep": false
38
+ }
39
+ ```
40
+
41
+ **参数说明:**
42
+ - `type`: `"phone"` (必填)
43
+ - `verificationMethods`: 验证方式数组,第一项为默认方式
44
+ - `"password"` - 密码登录
45
+ - `"verification_code"` - 验证码登录
46
+ - 可以只配置一种:`["verification_code"]` 或 `["password"]`
47
+ - 配置多种时,用户可以在界面下方的 "OR" 区域切换验证方式
48
+ - 例如:`["verification_code", "password"]` 默认显示验证码登录,下方显示"Password login"切换按钮
49
+ - `stepByStep`: 是否分步骤登录(仅对密码登录有效)
50
+
51
+ #### Google 登录
52
+
53
+ ```json
54
+ {
55
+ "type": "google",
56
+ "clientId": "your-google-client-id"
57
+ }
58
+ ```
59
+
60
+ **参数说明:**
61
+ - `type`: `"google"` (必填)
62
+ - `clientId`: Google Client ID(可选)
63
+
64
+ #### Facebook 登录
65
+
66
+ ```json
67
+ {
68
+ "type": "facebook",
69
+ "appId": "your-facebook-app-id"
70
+ }
71
+ ```
72
+
73
+ **参数说明:**
74
+ - `type`: `"facebook"` (必填)
75
+ - `appId`: Facebook App ID(可选)
76
+
77
+ #### Apple 登录
78
+
79
+ ```json
80
+ {
81
+ "type": "apple",
82
+ "clientId": "your-apple-client-id"
83
+ }
84
+ ```
85
+
86
+ **参数说明:**
87
+ - `type`: `"apple"` (必填)
88
+ - `clientId`: Apple Client ID(可选)
89
+
90
+ ## 可选配置
91
+
92
+ ### ui(UI 配置)
93
+
94
+ #### logo
95
+
96
+ ```json
97
+ {
98
+ "show": true,
99
+ "url": "https://your-logo.png",
100
+ "position": "center"
101
+ }
102
+ ```
103
+
104
+ #### title(标题)
105
+
106
+ ```json
107
+ {
108
+ "show": true,
109
+ "text": "Welcome back",
110
+ "align": "center"
111
+ }
112
+ ```
113
+
114
+ #### subtitle(副标题)
115
+
116
+ ```json
117
+ {
118
+ "show": true,
119
+ "text": "Log in to your account",
120
+ "align": "center"
121
+ }
122
+ ```
123
+
124
+ #### desc(描述)
125
+
126
+ ```json
127
+ {
128
+ "show": true,
129
+ "text": "Welcome back! Please enter your details.",
130
+ "align": "center"
131
+ }
132
+ ```
133
+
134
+ #### formLabels(表单标签)
135
+
136
+ ```json
137
+ {
138
+ "email": {
139
+ "show": true,
140
+ "text": "Email"
141
+ },
142
+ "phone": {
143
+ "show": true,
144
+ "text": "Phone Number"
145
+ },
146
+ "password": {
147
+ "show": true,
148
+ "text": "Password"
149
+ },
150
+ "verificationCode": {
151
+ "show": true,
152
+ "text": "Verification Code"
153
+ }
154
+ }
155
+ ```
156
+
157
+ #### themeColor(主题色)
158
+
159
+ ```json
160
+ "#7F56D9"
161
+ ```
162
+
163
+ ### channel(渠道标识)
164
+
165
+ 字符串类型,用于区分不同来源的登录请求。
166
+
167
+ ## 验证方式切换说明
168
+
169
+ 当为邮箱或手机配置多个验证方式时(例如:`verificationMethods: ["password", "verification_code"]`),用户界面会出现以下变化:
170
+
171
+ ### 默认显示
172
+
173
+ - **第一个验证方式**会作为默认显示
174
+ - 例如:`["password", "verification_code"]` → 默认显示密码输入框
175
+
176
+ ### OR 分隔线
177
+
178
+ - 主表单下方会显示一条 "OR" 分隔线
179
+
180
+ ### 切换选项
181
+
182
+ - OR 下方会显示其他验证方式的切换按钮
183
+ - 邮箱验证码:显示 "Email code to xxx@example.com"
184
+ - 手机验证码:显示 "SMS code to 138****8000"
185
+ - 密码登录:显示 "Password login"
186
+
187
+ ### 实际效果
188
+
189
+ **配置:**
190
+ ```json
191
+ {
192
+ "type": "email",
193
+ "verificationMethods": ["password", "verification_code"]
194
+ }
195
+ ```
196
+
197
+ **界面显示:**
198
+ ```
199
+ ┌─────────────────────────┐
200
+ │ Email Input │
201
+ │ Password Input │
202
+ │ [Remember me] [Forgot?] │
203
+ │ [Log in Button] │
204
+ ├─────────────────────────┤
205
+ │ OR │
206
+ ├─────────────────────────┤
207
+ │ 📧 Email code to u***@ │ ← 点击切换到验证码登录
208
+ └─────────────────────────┘
209
+ ```
210
+
211
+ 点击后切换为:
212
+ ```
213
+ ┌─────────────────────────┐
214
+ │ Email Input │
215
+ │ Verification Code Input │
216
+ │ [Log in Button] │
217
+ ├─────────────────────────┤
218
+ │ OR │
219
+ ├─────────────────────────┤
220
+ │ 🔑 Password login │ ← 点击切换回密码登录
221
+ └─────────────────────────┘
222
+ ```
223
+
224
+ ## 完整配置示例
225
+
226
+ ### 示例 1:邮箱密码登录 + Google
227
+
228
+ ```json
229
+ {
230
+ "config": {
231
+ "loginMethods": [
232
+ {
233
+ "type": "email",
234
+ "verificationMethods": ["password"],
235
+ "stepByStep": false
236
+ },
237
+ {
238
+ "type": "google",
239
+ "clientId": "your-client-id"
240
+ }
241
+ ],
242
+ "ui": {
243
+ "title": {
244
+ "show": true,
245
+ "text": "Welcome back",
246
+ "align": "center"
247
+ },
248
+ "subtitle": {
249
+ "show": true,
250
+ "text": "Log in to your account",
251
+ "align": "center"
252
+ },
253
+ "themeColor": "#7F56D9"
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ ### 示例 2:邮箱分步骤登录 + 多种方式
260
+
261
+ ```json
262
+ {
263
+ "config": {
264
+ "loginMethods": [
265
+ {
266
+ "type": "email",
267
+ "verificationMethods": ["password", "verification_code"],
268
+ "stepByStep": true
269
+ },
270
+ {
271
+ "type": "google",
272
+ "clientId": "xxx"
273
+ },
274
+ {
275
+ "type": "facebook",
276
+ "appId": "xxx"
277
+ },
278
+ {
279
+ "type": "phone",
280
+ "verificationMethods": ["verification_code"]
281
+ }
282
+ ],
283
+ "ui": {
284
+ "themeColor": "#7F56D9"
285
+ },
286
+ "channel": "web"
287
+ }
288
+ }
289
+ ```
290
+
291
+ ### 示例 3:纯第三方登录
292
+
293
+ ```json
294
+ {
295
+ "config": {
296
+ "loginMethods": [
297
+ {
298
+ "type": "google",
299
+ "clientId": "xxx"
300
+ },
301
+ {
302
+ "type": "apple",
303
+ "clientId": "xxx"
304
+ },
305
+ {
306
+ "type": "facebook",
307
+ "appId": "xxx"
308
+ }
309
+ ]
310
+ }
311
+ }
312
+ ```
313
+
314
+ ### 示例 4:邮箱验证码 + 密码(可切换)
315
+
316
+ ```json
317
+ {
318
+ "config": {
319
+ "loginMethods": [
320
+ {
321
+ "type": "email",
322
+ "verificationMethods": ["verification_code", "password"]
323
+ }
324
+ ],
325
+ "ui": {
326
+ "title": {
327
+ "show": true,
328
+ "text": "Welcome back",
329
+ "align": "center"
330
+ }
331
+ }
332
+ }
333
+ }
334
+ ```
335
+
336
+ **说明:**
337
+ - 默认显示验证码登录
338
+ - 用户可以点击 "Password login" 切换到密码登录
339
+ - 密码登录时可以点击 "Email code to xxx" 切换回验证码
340
+
341
+ ### 示例 5:纯密码登录(无切换)
342
+
343
+ ```json
344
+ {
345
+ "config": {
346
+ "loginMethods": [
347
+ {
348
+ "type": "email",
349
+ "verificationMethods": ["password"]
350
+ }
351
+ ]
352
+ }
353
+ }
354
+ ```
355
+
356
+ **说明:**
357
+ - 只显示密码登录
358
+ - 不显示 OR 分隔线
359
+ - 无其他验证方式切换选项
360
+
361
+ ### 示例 6:纯验证码登录(无切换)
362
+
363
+ ```json
364
+ {
365
+ "config": {
366
+ "loginMethods": [
367
+ {
368
+ "type": "phone",
369
+ "verificationMethods": ["verification_code"]
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ ```
375
+
376
+ **说明:**
377
+ - 只显示手机验证码登录
378
+ - 不显示 OR 分隔线
379
+ - 无其他验证方式切换选项
380
+
381
+ ## 事件回调
382
+
383
+ ### onLogin
384
+
385
+ 登录回调,参数:`(data, method, channel)`
386
+
387
+ ```javascript
388
+ function(data, method, channel) {
389
+ console.log('Login:', data, method, channel);
390
+ // data = { account, password, verification_code, remember_me }
391
+ // method = 'email' | 'phone'
392
+ // channel = 'web' (如果配置了)
393
+ }
394
+ ```
395
+
396
+ ### onOAuthLogin
397
+
398
+ 三方登录回调,参数:`(provider, channel)`
399
+
400
+ ```javascript
401
+ function(provider, channel) {
402
+ console.log('OAuth login:', provider, channel);
403
+ // provider = 'google' | 'facebook' | 'apple'
404
+ }
405
+ ```
406
+
407
+ ### onSendVerificationCode
408
+
409
+ 发送验证码回调,参数:`(account, type, channel)`
410
+
411
+ ```javascript
412
+ function(account, type, channel) {
413
+ console.log('Send code to:', account, type);
414
+ // account = 用户输入的邮箱或手机号
415
+ // type = 'email' | 'phone'
416
+ }
417
+ ```
418
+
419
+ ### onForgotPassword
420
+
421
+ 忘记密码回调,参数:`(account, channel)`
422
+
423
+ ```javascript
424
+ function(account, channel) {
425
+ console.log('Forgot password:', account);
426
+ // account = 用户输入的邮箱或手机号
427
+ }
428
+ ```
429
+
430
+ ### onClose
431
+
432
+ 关闭组件回调
433
+
434
+ ```javascript
435
+ function() {
436
+ console.log('Close login modal');
437
+ }
438
+ ```
439
+
440
+ ## 注意事项
441
+
442
+ 1. **loginMethods 必填**:至少需要配置一种登录方式
443
+ 2. **顺序很重要**:数组第一项为默认登录方式
444
+ 3. **分步骤登录**:仅对密码登录有效,验证码登录始终为单步
445
+ 4. **验证方式顺序**:`verificationMethods` 数组第一项为默认验证方式
446
+ 5. **Client ID/App ID**:使用第三方登录时需要提供对应的 ID
447
+