LoginRegister.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div id="login-register">
  3. <section class="login">
  4. <h3>{{ $t("default.Login") }} </h3>
  5. <LoginForm @onLogedIn="onLogedIn" />
  6. </section>
  7. <section class="register">
  8. <h3>{{ $t("default.Register a new account") }}</h3>
  9. <RegisterForm @onRegistered="onRegistered" />
  10. </section>
  11. </div>
  12. </template>
  13. <script>
  14. import { mapState, mapActions } from 'vuex'
  15. import LoginForm from 'vuejs/components/Form/LoginForm'
  16. import RegisterForm from 'vuejs/components/Form/RegisterForm'
  17. export default {
  18. name: "LoginRegister",
  19. data: () => ({
  20. loginEmail:null,
  21. password:null,
  22. registerEmail:null
  23. }),
  24. props:['callbackargs'],
  25. methods: {
  26. ...mapActions({
  27. userLogin: 'User/userLogin',
  28. userRegister: 'User/userRegister'
  29. }),
  30. onLogedIn () {
  31. this.$emit('onLogedIn', this.callbackargs)
  32. },
  33. onRegistered () {
  34. this.$emit('onRegistered', this.callbackargs)
  35. }
  36. },
  37. components: {
  38. LoginForm,
  39. RegisterForm
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. fieldset{
  45. padding:0;
  46. margin:0;
  47. border:none;
  48. }
  49. </style>