Undo the ts setting in vue components, begin migration to Vue.component setup
This commit is contained in:
parent
0e1d35c8a0
commit
6330d6579f
35 changed files with 179 additions and 198 deletions
36
resources/assets/scripts/components/auth/Login.ts
Normal file
36
resources/assets/scripts/components/auth/Login.ts
Normal file
|
@ -0,0 +1,36 @@
|
|||
import Vue from 'vue';
|
||||
import LoginForm from "./LoginForm";
|
||||
|
||||
export default Vue.component('login', {
|
||||
data: function () {
|
||||
return {
|
||||
user: {
|
||||
email: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
LoginForm,
|
||||
},
|
||||
methods: {
|
||||
onUpdateEmail: function (value: string) {
|
||||
this.$data.user.email = value;
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div>
|
||||
<!--<flash container="mb-2"/>-->
|
||||
<login-form
|
||||
v-if="this.$route.name === 'login'"
|
||||
v-bind:user="user"
|
||||
v-on:update-email="onUpdateEmail"
|
||||
/>
|
||||
<!--<forgot-password-->
|
||||
<!--v-if="this.$route.name === 'forgot-password'"-->
|
||||
<!--v-bind:email="user.email"-->
|
||||
<!--v-on:update-email="onUpdateEmail"-->
|
||||
<!--/>-->
|
||||
<!--<two-factor-form v-if="this.$route.name === 'checkpoint'" />-->
|
||||
</div>
|
||||
`,
|
||||
});
|
Reference in a new issue