1.0.3 • Published 4 years ago

bigegg-login v1.0.3

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

my-project

A Vue.js project

Installation

# install dependencies
$ npm  install  bigegg-login

property


@getVerificationCode=‘xxx函数名’ 点击’获取验证码‘触发

@mountedInFunction=‘xxx函数名’ 组件dom加载完成时触发 在mounted钩子函数中执行的函数

@inputValue=‘xxx函数名’ 点击登录时触发 获取用户名密码输入框中的值

:automaticLogin=‘一个布尔值’ 控制自动登录的默认选中或不选中 必须是布尔类型

forgotPassword=“路由路径” 跳转到‘忘记密码’的路由路径 必须是字符串类型

registerUser='路由路径' 跳转到‘注册登录’的路由路径 必须是字符串类型

usage


<template>
    <div class="home">
        <bigegg-login registerUser='/registerUser/' 
        :automaticLogin = 'false' 
        forgotPassword = "/forgotPassword/" 
        @inputValue = "handleInputValue" 
        @mountedInFunction = "handleMountedInFunction" 
        @getVerificationCode = "handleGetVerificationCode"
        ></bigegg-login>
    </div>
</template>

<script>
import bigegglogin from 'bigegg-login'
export default {
    name: 'Home',
    methods:{
        handleInputValue(eve){
            //eve:用户名密码输入框的内容
            console.log(eve)
        },
        handleMountedInFunction(){
            //可请求axios 进行用户名验证
            axios.get('http://localhost:3000/users').then((res)=>{
                console.log(res.data)
            })
        },
        handleGetVerificationCode(){
            console.log("处理 获取验证码 事件") 
        }
    }
    }
    </script>

For detailed explanation on how things work, consult the docs for vue-loader.

1.0.5

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago