Commit e021bbda authored by Le Dinh Trung's avatar Le Dinh Trung

add feature home-page

parent a6573e9a
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
class="fill-height" class="fill-height"
align="center" align="center"
justify="center" justify="center"
> />
<div class="text-h2">
{{ index +1 }}
</div>
</v-row>
</v-carousel-item> </v-carousel-item>
</v-carousel> </v-carousel>
</template> </template>
......
<template> <template>
<div> <div class="header-all">
<!-- header top --> <!-- header top -->
<div class="header-top"> <div class="header-top">
<v-container class="pa-0"> <v-container class="pa-0">
...@@ -290,6 +290,7 @@ export default { ...@@ -290,6 +290,7 @@ export default {
} }
this.updateWishlist() this.updateWishlist()
this.updateCart() this.updateCart()
window.addEventListener('scroll', this.handleScroll)
}, },
methods: { methods: {
closeDialog () { closeDialog () {
...@@ -415,12 +416,29 @@ export default { ...@@ -415,12 +416,29 @@ export default {
duration: 2000 duration: 2000
}) })
} }
},
handleScroll () {
const nav = document.querySelector('.header-middle')
const navv = document.querySelector('.header-all')
if (window.scrollY > navv.offsetTop) {
nav.classList.add('sticky')
} else {
nav.classList.remove('sticky')
}
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.header-middle.sticky {
position: fixed;
width: 100%;
background-color: #ffffff;
z-index: 100;
top: 0;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-top { .header-top {
border-bottom: 1px solid rgba(0, 0, 0, 0.12); border-bottom: 1px solid rgba(0, 0, 0, 0.12);
font-size: 12px; font-size: 12px;
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
{{ index + 1 }} {{ index + 1 }}
</template> </template>
<template #[`item.image`]="{ item }"> <template #[`item.image`]="{ item }">
<v-img :src="item.image" width="200" /> <v-img :src="item.image" max-width="200" />
</template> </template>
<template #[`item.status`]="{ item }"> <template #[`item.status`]="{ item }">
<v-switch <v-switch
......
This diff is collapsed.
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
required required
@input="$v.email.$touch()" @input="$v.email.$touch()"
@blur="$v.email.$touch()" @blur="$v.email.$touch()"
@keydown.enter="login"
/> />
<v-text-field <v-text-field
v-model="password" v-model="password"
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
@input="$v.password.$touch()" @input="$v.password.$touch()"
@blur="$v.password.$touch()" @blur="$v.password.$touch()"
@click:append="showPassword = !showPassword" @click:append="showPassword = !showPassword"
@keydown.enter="login"
/> />
<v-checkbox <v-checkbox
v-model="checkbox" v-model="checkbox"
......
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