fixed loading placeholder style and search component showing on loading
This commit is contained in:
parent
cd8b03681a
commit
36dbb78879
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
<template functional>
|
<template functional>
|
||||||
<div :id="props.id" class="loading_placeholder" v-show="!props.hidden">
|
<div :id="props.id" class="loading_placeholder" :class="{ 'loading_placeholder--hidden': props.hidden }">
|
||||||
<span class="loading_placeholder__text">{{ props.text }}</span>
|
<span class="loading_placeholder__text">{{ props.text }}</span>
|
||||||
<div class="lds-ring">
|
<div class="lds-ring">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<section id="content">
|
<section id="content">
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<BaseLoadingPlaceholder id="search_placeholder" text="Searching..." :hidden="!loading" />
|
<BaseLoadingPlaceholder id="search_placeholder" text="Searching..." :hidden="!loading" />
|
||||||
<router-view></router-view>
|
|
||||||
|
<router-view v-show="!loading"></router-view>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -54,7 +55,6 @@ export default {
|
|||||||
}),
|
}),
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$root.$on('updateSearchLoadingState', loading => {
|
this.$root.$on('updateSearchLoadingState', loading => {
|
||||||
console.log({ loading })
|
|
||||||
this.loading = loading
|
this.loading = loading
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -631,11 +631,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleMainSearch(result) {
|
handleMainSearch(result) {
|
||||||
this.$root.$emit('updateSearchLoadingState', false)
|
|
||||||
|
|
||||||
// Hiding loading placeholder
|
// Hiding loading placeholder
|
||||||
// document.getElementById('content').style.display = ''
|
this.$root.$emit('updateSearchLoadingState', false)
|
||||||
// document.getElementById('search_placeholder').classList.toggle('loading_placeholder--hidden')
|
|
||||||
|
|
||||||
let resetObj = { data: [], next: 0, total: 0, loaded: false }
|
let resetObj = { data: [], next: 0, total: 0, loaded: false }
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.loading_placeholder {
|
.loading_placeholder {
|
||||||
// display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
Loading…
Reference in New Issue
Block a user