From 540264a080d347846687cbb297587c5930a63c65 Mon Sep 17 00:00:00 2001
From: liangping <18786721@qq.com>
Date: Fri, 13 May 2022 18:41:28 +0800
Subject: [PATCH] add link to right menu
---
.../app-navbar/AppNavbarVerticalLayout.vue | 6 +-----
src/layouts/components/Navbar.vue | 1 +
src/views/WalletAccountDetail.vue | 17 +++++++++++++++++
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue b/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue
index 63a86bff..ece3dbfe 100644
--- a/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue
+++ b/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue
@@ -17,11 +17,7 @@
-
-
-
-
-
+
diff --git a/src/layouts/components/Navbar.vue b/src/layouts/components/Navbar.vue
index 328604a7..a0303494 100644
--- a/src/layouts/components/Navbar.vue
+++ b/src/layouts/components/Navbar.vue
@@ -110,6 +110,7 @@
v-for="(item,k) in accounts"
:key="k"
:disabled="!item.address"
+ :to="`/${selected_chain.chain_name}/account/${item.address.addr}`"
@click="updateDefaultWallet(item.wallet)"
>
diff --git a/src/views/WalletAccountDetail.vue b/src/views/WalletAccountDetail.vue
index 0242a0a4..8eae666d 100644
--- a/src/views/WalletAccountDetail.vue
+++ b/src/views/WalletAccountDetail.vue
@@ -646,6 +646,23 @@ export default {
this.error = err
})
},
+ beforeRouteUpdate(to, from, next) {
+ // const { address } = this.$route.params
+ const { address } = to.params
+ if (address !== from.params.hash) {
+ this.address = address
+ this.$http.getAuthAccount(this.address).then(acc => {
+ this.account = acc
+ this.initial()
+ this.$http.getTxsBySender(this.address).then(res => {
+ this.transactions = res
+ })
+ }).catch(err => {
+ this.error = err
+ })
+ next()
+ }
+ },
mounted() {
const elem = document.getElementById('txevent')
elem.addEventListener('txcompleted', () => {