From 03d502ccd4d2a2f6083e54b46f136dfd02e38493 Mon Sep 17 00:00:00 2001 From: "Alisa | Side.one" Date: Tue, 6 Jun 2023 20:06:26 +0800 Subject: [PATCH] feat: close modal --- src/layouts/components/NavbarSearch.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/layouts/components/NavbarSearch.vue b/src/layouts/components/NavbarSearch.vue index 612ad211..6693a43e 100644 --- a/src/layouts/components/NavbarSearch.vue +++ b/src/layouts/components/NavbarSearch.vue @@ -37,14 +37,20 @@ function confirm() { if (!Object.values(routeParams?.params).includes(key)) { if (height.test(key)) { vueRouters.push({ path: `/${current}/block/${key}` }); - closeSearchModal(); + setTimeout(() => { + closeSearchModal(); + }, 1000); } else if (txhash.test(key)) { vueRouters.push({ path: `/${current}/tx/${key}` }); - closeSearchModal(); + setTimeout(() => { + closeSearchModal(); + }, 1000); // this.$router.push({ name: 'transaction', params: { chain: c.chain_name, hash: key } }) } else if (addr.test(key)) { vueRouters.push({ path: `/${current}/account/${key}` }); - closeSearchModal(); + setTimeout(() => { + closeSearchModal(); + }, 1000); } else { errorMessage.value = 'The input not recognized'; } @@ -102,6 +108,12 @@ function confirm() { v-model="searchQuery" placeholder="Height/Transaction/Account Address" /> +
+ {{ errorMessage }} +