create searchBox section
This commit is contained in:
@@ -2,6 +2,23 @@
|
||||
|
||||
<NuxtLoadingIndicator color="#ffbe33" :duration="1" :throttle="0"/>
|
||||
<NuxtLayout />
|
||||
<NuxtPage />
|
||||
<div @click="showSearchBox = false">
|
||||
<NuxtPage />
|
||||
</div>
|
||||
<NuxtLayout name="footer"/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const showSearchBox = useState("showSearchBox");
|
||||
watch(showSearchBox, ()=>{
|
||||
if (process.client) {
|
||||
if (showSearchBox.value === true) {
|
||||
document.body.classList.add('overflow-hidden')
|
||||
}else{
|
||||
document.body.classList.remove('overflow-hidden')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user