lcap-login

1.2.3 • Public • Published

LcapLogin 登录

runtime

账号与权限中心的统一认证登录组件

示例

基本用法

<lcap-login   useGithub></lcap-login>

工行登录

<lcap-login   useIcbc hasUserCenter></lcap-login>

API

Props/Attrs

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\]] 跳转登录配置

Events

@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 '' 密码

Package Sidebar

Install

npm i lcap-login

Weekly Downloads

63

Version

1.2.3

License

MIT

Unpacked Size

894 kB

Total Files

61

Last publish

Collaborators

  • zhangsanshi
  • jianglinghao
  • lifuquan
  • lip966
  • zhangxiaoyudaisy
  • clockmorning