materio-d9/web/themes/custom/materiotheme/vuejs/components/Helper/LoginRegister.vue

51 lines
887 B
Vue
Raw Normal View History

<template>
<div id="login-register">
<h3>Login</h3>
<LoginForm @onLogedIn="onLogedIn" />
<h3>Register</h3>
<RegisterForm @onRegistered="onRegistered" />
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import LoginForm from 'vuejs/components/Form/LoginForm'
import RegisterForm from 'vuejs/components/Form/RegisterForm'
export default {
name: "LoginRegister",
data: () => ({
loginEmail:null,
password:null,
registerEmail:null
}),
methods: {
...mapActions({
userLogin: 'User/userLogin',
userRegister: 'User/userRegister'
}),
onLogedIn () {
this.$emit('onLogedIn')
},
onRegistered () {
this.$emit('onRegistered')
}
},
components: {
LoginForm,
RegisterForm
}
}
</script>
<style lang="scss" scoped>
fieldset{
padding:0;
margin:0;
border:none;
}
</style>