xiongzhu 2 anos atrás
pai
commit
ee8d5ad507
2 arquivos alterados com 11 adições e 3 exclusões
  1. 10 3
      src/views/AccountsView.vue
  2. 1 0
      src/views/LogsView.vue

+ 10 - 3
src/views/AccountsView.vue

@@ -26,9 +26,9 @@
                     <WalletAddress :address="row.address" />
                     <WalletAddress :address="row.address" />
                 </template>
                 </template>
             </ElTableColumn>
             </ElTableColumn>
-            <ElTableColumn prop="ethBalance" label="ETH余额" min-width="160" show-overflow-tooltip />
-            <ElTableColumn prop="zkBalance" label="ETH余额(ZK)" min-width="160" show-overflow-tooltip />
-            <ElTableColumn prop="zkUsdcBalance" label="USDC余额(ZK)" min-width="160" show-overflow-tooltip />
+            <ElTableColumn prop="ethBalance" label="ETH余额" min-width="100" :formatter="numberFormatter(6)" />
+            <ElTableColumn prop="zkBalance" label="ETH余额(ZK)" min-width="100" :formatter="numberFormatter(6)" />
+            <ElTableColumn prop="zkUsdcBalance" label="USDC余额" min-width="100" :formatter="numberFormatter(6)"/>
             <ElTableColumn prop="offBridgeNum" label="官方跨链" width="100" sortable></ElTableColumn>
             <ElTableColumn prop="offBridgeNum" label="官方跨链" width="100" sortable></ElTableColumn>
             <ElTableColumn
             <ElTableColumn
                 prop="lastOffBridge"
                 prop="lastOffBridge"
@@ -146,6 +146,13 @@ function onRowClick(row, column, event) {
     table.value.toggleRowSelection(row)
     table.value.toggleRowSelection(row)
 }
 }
 
 
+function numberFormatter(num) {
+    return function (row, column, value, index) {
+        if (!value) return value
+        return Number(value).toFixed(num).replace(/\.0+$/, '')
+    }
+}
+
 function onAddAccount() {
 function onAddAccount() {
     if (addFormRef.value) {
     if (addFormRef.value) {
         addFormRef.value.clearValidate()
         addFormRef.value.clearValidate()

+ 1 - 0
src/views/LogsView.vue

@@ -18,6 +18,7 @@
                     <WalletAddress :address="row.address" />
                     <WalletAddress :address="row.address" />
                 </template>
                 </template>
             </ElTableColumn>
             </ElTableColumn>
+            <ElTableColumn prop="amount" label="金额" />
             <ElTableColumn prop="status" label="状态" align="center" width="80">
             <ElTableColumn prop="status" label="状态" align="center" width="80">
                 <template #default="{ row }">
                 <template #default="{ row }">
                     <ElTag type="success" v-if="row.status === 'success'"> 成功 </ElTag>
                     <ElTag type="success" v-if="row.status === 'success'"> 成功 </ElTag>