OSDN Git Service

fix: add default for balance
authormonky <monky@it709.com>
Wed, 2 Jan 2019 14:25:52 +0000 (22:25 +0800)
committermonky <monky@it709.com>
Wed, 2 Jan 2019 14:25:52 +0000 (22:25 +0800)
src/views/home.vue

index c264eeb..356f656 100644 (file)
@@ -206,7 +206,9 @@ export default {
             clipboard: new ClipboardJS(".address-text"),
             addressTitle: this.$t("main.copy"),
             accounts: [],
-            currentAccount: {},
+            currentAccount: {
+                balance: 0.00
+            },
             transactions: [],
             maskShow: false,
             start: 0,
@@ -237,6 +239,7 @@ export default {
             }
         },
         currentAccount(newVal, oldVal) {
+            localStorage.currentAccount = JSON.stringify(newVal);
             if (newVal.guid == undefined) {
                 return;
             }