@paris-ias/list 1.0.116 → 1.0.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -13,10 +13,6 @@
|
|
|
13
13
|
tile
|
|
14
14
|
type="search"
|
|
15
15
|
:loading="rootStore.loading"
|
|
16
|
-
@keyup.enter="type === 'all' ? $router.push(localePath('/search')) : null"
|
|
17
|
-
@click:append="
|
|
18
|
-
type === 'all' ? $router.push(localePath('/search')) : null
|
|
19
|
-
"
|
|
20
16
|
>
|
|
21
17
|
<!-- :loading="$nuxt.loading || $store.state.loading" :class="{ 'mt-3':
|
|
22
18
|
$store.state.scrolled }" -->
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
type="search"
|
|
19
19
|
:loading="rootStore.loading"
|
|
20
20
|
@keyup.enter="$router.push(localePath('/search'))"
|
|
21
|
+
@click:append="$router.push(localePath('/search'))"
|
|
21
22
|
>
|
|
22
23
|
<!-- :loading="$nuxt.loading || $store.state.loading" :class="{ 'mt-3':
|
|
23
24
|
$store.state.scrolled }" -->
|
|
@@ -237,8 +237,15 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
237
237
|
search = "",
|
|
238
238
|
lang = "en"
|
|
239
239
|
}) {
|
|
240
|
+
const { $stores } = useNuxtApp();
|
|
240
241
|
console.log("updateSearch", { type, search, lang });
|
|
241
|
-
|
|
242
|
+
if (type === "all") {
|
|
243
|
+
this.search = search;
|
|
244
|
+
} else {
|
|
245
|
+
if ($stores[type]) {
|
|
246
|
+
$stores[type].search = search;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
242
249
|
await this.update(type, lang);
|
|
243
250
|
},
|
|
244
251
|
async update(type, lang = "en") {
|
|
@@ -274,7 +281,10 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
274
281
|
// add the store module filters
|
|
275
282
|
filters
|
|
276
283
|
},
|
|
277
|
-
...
|
|
284
|
+
...type === "all" && this.search?.length && { search: this.search },
|
|
285
|
+
...type !== "all" && $stores[type].search?.length && {
|
|
286
|
+
search: $stores[type].search
|
|
287
|
+
},
|
|
278
288
|
appId: "iea",
|
|
279
289
|
lang
|
|
280
290
|
})
|