Janie 2 years ago
parent
commit
886edbe36a
  1. 22
      FrontEnd/components/NavBar.vue
  2. 12
      FrontEnd/components/home/headerInlineSearch.vue
  3. 7
      FrontEnd/pages/exhibition/index.vue

22
FrontEnd/components/NavBar.vue

@ -38,7 +38,7 @@
height="24" />
</svg>
</v-card> -->
<div v-if="showNavSearch" class="tw-w-full tw-hidden xl:tw-block">
<div v-if="showNavSearch" class="tw-w-full tw-hidden xl:tw-block" style="border: 1px solid red;">
<Search
v-if="showNavSearch"
:exhibitionsCategories="exhibitionsCategories"
@ -46,9 +46,11 @@
:exhibitionsSearchs="exhibitionsSearchs"
:servicesLocations="servicesLocations"
:servicesSearchs="servicesSearchs"
@loaading="isPageLoading = true"
@keyword-search="Search"
/>
<!-- @loaading="Search" -->
</div>
</div>
<div
class="tw-basis-[46%] md:tw-basis-[66%] xl:tw-basis-[43%] xl:tw-ml-[56px]"
@ -862,6 +864,22 @@ export default {
},
},
methods: {
Search(str) {
console.log(str)
const currentVal = this.$route.query.q;
if(currentVal === str){
this.isPageLoading = false
}else{
this.isPageLoading = true
}
// setTimeout(()=> {
// this.isPageLoading = false
// },3000);
},
clickOutSide() {
this.show = false;
this.UserInfoPopup = false;

12
FrontEnd/components/home/headerInlineSearch.vue

@ -13,10 +13,12 @@
<input v-show="!bigSearch"
class="custom-control flex-grow-1 tw-placeholder-text-[14px] md:tw-placeholder-text-[16px]"
:placeholder="$t(customPlaceholder)" />
<input v-show="bigSearch" ref="search"
<input v-show="bigSearch" ref="search"
class="custom-control flex-grow-1 tw-placeholder-text-[14px] md:tw-placeholder-text-[16px]" v-model="inputs"
:placeholder="$t(customPlaceholder)" @input="handleInput" @click="handleClick"
v-on:keyup.enter="goToSearch()" />
@keyup.enter="goToSearch()" />
<svg width="24" height="24" class="tw-my-auto tw-cursor-pointer" shape-rendering="geometricPrecision"
@click="goToSearch()">
<image xlink:href="@/assets/svg/icon-search-small.svg" src="@/assets/svg/icon-search-small.svg" width="24"
@ -369,9 +371,11 @@ export default {
this.customPlaceholder = 'Search exhibitions or services...';
}
},
goToSearch() {
this.$emit('loaading', true);
goToSearch(str) {
str = this.inputs;
this.$emit('keyword-search', str, true)
this.$router.push(this.localePath(`/${this.type}?q=${this.inputs}`));
this.inputs = '';
},
},
computed: {

7
FrontEnd/pages/exhibition/index.vue

@ -568,6 +568,13 @@ export default {
// this.query = this.query + "";
// console.log("getExhibitionCard"+": "+this.query)
<<<<<<< HEAD
// this.query = this.query + "";
// console.log("getExhibitionCard"+": "+this.query)
=======
>>>>>>> 221c7d61404524a69834d629a1d1430b1172e744
await this.$axios
.get(
`/trending/api/Exhibition/Cards?Lang=${this.$i18n.localeProperties["langQuery"]}` +

Loading…
Cancel
Save