forked from cerc-io/cosmos-explorer
feat: close modal
This commit is contained in:
parent
24501beea4
commit
03d502ccd4
@ -37,14 +37,20 @@ function confirm() {
|
|||||||
if (!Object.values(routeParams?.params).includes(key)) {
|
if (!Object.values(routeParams?.params).includes(key)) {
|
||||||
if (height.test(key)) {
|
if (height.test(key)) {
|
||||||
vueRouters.push({ path: `/${current}/block/${key}` });
|
vueRouters.push({ path: `/${current}/block/${key}` });
|
||||||
closeSearchModal();
|
setTimeout(() => {
|
||||||
|
closeSearchModal();
|
||||||
|
}, 1000);
|
||||||
} else if (txhash.test(key)) {
|
} else if (txhash.test(key)) {
|
||||||
vueRouters.push({ path: `/${current}/tx/${key}` });
|
vueRouters.push({ path: `/${current}/tx/${key}` });
|
||||||
closeSearchModal();
|
setTimeout(() => {
|
||||||
|
closeSearchModal();
|
||||||
|
}, 1000);
|
||||||
// this.$router.push({ name: 'transaction', params: { chain: c.chain_name, hash: key } })
|
// this.$router.push({ name: 'transaction', params: { chain: c.chain_name, hash: key } })
|
||||||
} else if (addr.test(key)) {
|
} else if (addr.test(key)) {
|
||||||
vueRouters.push({ path: `/${current}/account/${key}` });
|
vueRouters.push({ path: `/${current}/account/${key}` });
|
||||||
closeSearchModal();
|
setTimeout(() => {
|
||||||
|
closeSearchModal();
|
||||||
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
errorMessage.value = 'The input not recognized';
|
errorMessage.value = 'The input not recognized';
|
||||||
}
|
}
|
||||||
@ -102,6 +108,12 @@ function confirm() {
|
|||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
placeholder="Height/Transaction/Account Address"
|
placeholder="Height/Transaction/Account Address"
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
class="mt-2 text-right text-sm text-error"
|
||||||
|
v-show="errorMessage"
|
||||||
|
>
|
||||||
|
{{ errorMessage }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- foot -->
|
<!-- foot -->
|
||||||
|
Loading…
Reference in New Issue
Block a user