Commit fa869a70 authored by vietanh-0511's avatar vietanh-0511

fix bug login and register modal

parent 19c5ec2e
<template> <template>
<v-row v-if="dialog" justify="center"> <v-row
v-if="dialog"
justify="center"
>
<v-dialog <v-dialog
v-model="dialog" v-model="dialog"
persistent
width="450px" width="450px"
> >
<!-- <template #activator="{ on, attrs }">
<v-btn
color="primary"
dark
v-bind="attrs"
v-on="on"
>
Open Dialog
</v-btn>
</template> -->
<v-card-title class="justify-center"> <v-card-title class="justify-center">
<p class="font-weight-black" style="font-size: 35px"> <p class="font-weight-black" style="font-size: 35px">
LOGIN LOGIN
...@@ -81,23 +75,23 @@ ...@@ -81,23 +75,23 @@
<script> <script>
export default { export default {
name: 'LoginModal', name: 'LoginModal',
props: { props: {
status: { status: {
type: Boolean, type: Boolean,
default: true default: true
} }
}, },
data: () => ({ data: () => ({
email: '', email: '',
password: '' password: ''
}), }),
computed: { computed: {
dialog () { dialog () {
return this.status return this.status
} }
}, },
methods: { methods: {
async login () { async login () {
try { try {
const resp = await this.$axios.post('/login', const resp = await this.$axios.post('/login',
...@@ -122,13 +116,15 @@ methods: { ...@@ -122,13 +116,15 @@ methods: {
this.$router.push('/login') this.$router.push('/login')
} }
} }
} }
} }
</script> </script>
<style> <style scoped>
.formlogin { .formlogin {
padding: 30px; padding: 30px;
} }
::v-deep .v-dialog{
background-color: #5ae2dc;
}
</style> </style>
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<v-row v-if="dialog" justify="center"> <v-row v-if="dialog" justify="center">
<v-dialog <v-dialog
v-model="dialog" v-model="dialog"
persistent
width="450px" width="450px"
> >
<v-card-title class="justify-center"> <v-card-title class="justify-center">
...@@ -155,8 +156,11 @@ export default { ...@@ -155,8 +156,11 @@ export default {
} }
</script> </script>
<style> <style scoped>
.formlogin { .formlogin {
padding: 30px; padding: 30px;
} }
::v-deep .v-dialog{
background-color: #5ae2dc;
}
</style> </style>
...@@ -244,8 +244,8 @@ ...@@ -244,8 +244,8 @@
<!-- end header bottom --> <!-- end header bottom -->
<!-- show modal --> <!-- show modal -->
<LoginModal v-click-outside="() => activeLogin = false" :status="activeLogin" @close="activeLogin=false" /> <LoginModal :status="activeLogin" @close="activeLogin=false" />
<SignupModal v-click-outside="() => activeRegister = false" :status="activeRegister" @close="activeRegister=false" /> <SignupModal :status="activeRegister" @close="activeRegister=false" />
</div> </div>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment