-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e5b0da
commit a4caedf
Showing
10 changed files
with
87 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export default{ | ||
data(){ | ||
return { | ||
user:{ | ||
email:'', | ||
password:'' | ||
} | ||
} | ||
}, | ||
methods:{ | ||
loginUser(){ | ||
if(this.$validator.validateAll()){ | ||
this.$validator.validate().then( result => { | ||
if (result){ | ||
console.log("valid!") | ||
} | ||
}) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<v-container> | ||
<v-layout justify-center> | ||
<v-flex md6> | ||
<h1>Login</h1><hr> | ||
<v-flex xs12> | ||
<v-text-field | ||
v-model="user.email" | ||
name="username" | ||
v-validate="'required'" | ||
:error-messages="errors.collect('username')" | ||
:label="email" | ||
:data-vv-as="email" | ||
></v-text-field> | ||
</v-flex> | ||
<v-flex xs12> | ||
<v-text-field | ||
v-model="user.password" | ||
name="password" | ||
v-validate="'required|min:8'" | ||
:error-messages="errors.collect('password')" | ||
:label="password" | ||
type="password" | ||
></v-text-field> | ||
</v-flex> | ||
<v-flex xs12> | ||
<v-btn | ||
color="primary" | ||
@click="loginUser" | ||
> | ||
LogIn | ||
</v-btn> | ||
</v-flex> | ||
</v-flex> | ||
</v-layout> | ||
</v-container> | ||
</template> | ||
<script src="./Login.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import Vue from 'vue' | ||
import Router from 'vue-router' | ||
import Home from './views/Home.vue' | ||
import Login from './components/UserManagement/Login.vue' | ||
|
||
Vue.use(Router) | ||
|
||
export default new Router({ | ||
mode: 'history', | ||
base: process.env.BASE_URL, | ||
routes: [ | ||
{ | ||
path: '/', | ||
name: 'home', | ||
component: Home | ||
}, | ||
{ | ||
path: '/about', | ||
name: 'about', | ||
// route level code-splitting | ||
// this generates a separate chunk (about.[hash].js) for this route | ||
// which is lazy-loaded when the route is visited. | ||
component: () => import(/* webpackChunkName: "about" */ './views/About.vue') | ||
{ | ||
path:'/login', | ||
name:'login', | ||
component: Login | ||
} | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default{ | ||
state: { | ||
user: localStorage.getItem('user') | ||
}, | ||
mutations: { | ||
|
||
}, | ||
actions: { | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.