<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 -->
- 示例
- 基本用法
- 工行登录
- [API]()
- Props/Attrs
- Events
- Methods
runtime
账号与权限中心的统一认证登录组件
html
`
$3
` html
`
API
$3
| Prop/Attr | Type | Options | Default | Description |
| --------- | ---- | ------- | ------- | ----------- |
| useRedirect | boolean | |
false | 是否开启登录页。若关闭登录页,请选择跳转登录配置,否则会影响应用的登录和权限控制 |
| mainLoginTypes | objectArray | | [\[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\]] | 账号密码登录类型 |
| subLoginTypes | objectArray | | [\[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\]] | 跳转登录类型 |
| redirectLoginTypes | objectArray | | [\[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\], \[object Object\]] | 跳转登录配置 |$3
#### @success
登录成功后触发
| Param | Type | Description |
| ----- | ---- | ----------- |
| $event.Authorization | string | 登录成功后为用户颁发的 AccessToken |
| $event.UserId | string | 用户 ID |
| $event.UserName | string | 用户名 |
| $event.Message | string | 登录成功的信息 |
#### @error
登录失败后触发
| Param | Type | Description |
| ----- | ---- | ----------- |
| $event.Message | string | 登录失败的信息 |
Methods
#### jumpAuthPass()
跳转第三方登录页面
| Param | Type | Default | Description |
| ----- | ---- | ------- | ----------- |
#### jumpAuth(type)
跳转第三方登录页面
| Param | Type | Default | Description |
| ----- | ---- | ------- | ----------- |
| type | string |
'' | 第三方登录类型 |#### login(account, password)
使用账号密码登录
| Param | Type | Default | Description |
| ----- | ---- | ------- | ----------- |
| account | string |
'' | 账号 |
| password | string | ''` | 密码 |