1.0.1 • Published 4 years ago

@haironghaha/login-demo v1.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

公共登录弹窗 demo

使用说明

此项目依赖 Vue & Sass,使用前请确保已安装这两个依赖包

此项目包含登录注册弹窗及确认弹窗两个组件

确认弹窗组件

此组件入参 title,回调,使用例子如下

// 写法一
this.$LoginAlert('请登录后访问')
.then(() => {
    console.log('确定之后的回调')
})
.catch(() => {
    console.log('关闭弹窗后的回调')
})

// 写法二
this.$LoginAlert({
    title: '请登录后访问'
})
.then(() => {
    console.log('确定之后的回调')
})
.catch(() => {
    console.log('关闭弹窗后的回调')
})

登录注册弹窗组件

属性名类型默认值说明
currentComponentStringLogin当前显示组件,可选值为:Login(登录)Register(注册)SafetyIdentity(安全验证)
tabsArray'Register', 'Login'切换栏显示组件默认注册登录,可以不传
tabMapperobjectRegister: '注册', Login: '登录',SafetyIdentity: '安全验证'组件对应在 tab 栏上显示的名称,若无需修改可以不传
onRegisteredFunctionnull注册成功后回调
onSignedFunctionnull登录成功后回调
onResetPwdFunctionnull重置密码后回调

使用例子如下

this.$LayerLogin({
    currentComponent: current,
    onRegistered: res => {
        console.log(res)
    },
    onSigned: res => {
        console.log(res)
    },
    onResetPwd: res => {
        console.log(res)
    }
})
1.0.1

4 years ago

1.0.0

4 years ago