소스 검색

调整 展示字段

会飞的电脑 2 년 전
부모
커밋
b49ddcaa18

+ 6 - 6
src/components/Block.vue

@@ -37,11 +37,12 @@ export default {
       data: [],
       headers: [
         {text: "Option", value: 'option'},
-        {text: 'block', value: 'blockNumber'},
-        {text: 'comment', value: 'comment'},
-        {text: 'isMev', value: 'isMev'},
-        {text: 'isBot', value: 'isBot'},
-        {text: 'history', value: 'history', width: '10%'},
+        {text: 'Block', value: 'blockNumber'},
+        {text: 'Comment', value: 'comment'},
+        {text: 'IsMev', value: 'isMev'},
+        {text: 'IsBot', value: 'isBot'},
+        {text: 'Timestamp', value: 'timestamp'},
+        {text: 'History', value: 'history', width: '10%'},
       ]
     },
   }),
@@ -53,7 +54,6 @@ export default {
       this.table.loading = true
       this.table.data.length = 0
 
-      console.log("?",this.query)
       const rst = await this.block.find(this.query, this.table.pageNum, this.table.pageSize)
 
       if (rst.state) {

+ 1 - 1
src/components/NewHistory.vue

@@ -58,7 +58,7 @@ export default {
         {text: 'isMev', value: 'isMev'},
         {text: 'isBot', value: 'isBot'},
         {text: 'timestamp', value: 'timestamp'},
-        {text: 'transfer', value: 'transferList'},
+        {text: 'transfer', value: 'transferList', width: '20%'},
         {text: 'comment', value: 'comment'}
       ]
     },

+ 4 - 2
src/components/viewer/block/Table.vue

@@ -83,9 +83,11 @@
         <template v-slot:item.isBot="{ item }">
           <BooleanViewer :value="item.isBot"></BooleanViewer>
         </template>
+        <template v-slot:item.timestamp="{ item }">
+          {{ formatTimeBySixBitTimestamp(item.timestamp) }}
+        </template>
         <template v-slot:item.history="{ item }">
-          <div class="tradeInfoBtn" @click="showTradeInfo(item)">
-          </div>
+          <v-btn  @click="showTradeInfo(item)">显示</v-btn>
         </template>
         <template v-slot:item.comment="{ item }">
           <div v-if="item.comment">

+ 5 - 5
src/components/viewer/newhistory/Table.vue

@@ -6,7 +6,7 @@
         <v-container id="dataTableHeader">
           <v-row>
             <v-col cols="4">
-              {{ page.name+'  block: '+ query.tx.block }}
+              {{ page.name + '  block: ' + query.tx.block }}
             </v-col>
             <v-col cols="8">
               <v-text-field hide-details single-line label="Local Search" append-icon="mdi-magnify"
@@ -166,11 +166,10 @@
         <template v-slot:item.transferList="{ item }">
           <div v-if="page.name === 'History Page'">
             <div class="tradeInfoBtn" @click="showTradeInfo(item)">
-              <v-chip v-for="tokenAddress in item.tokenAddressList" :key='tokenAddress'
-                      :color="item.tokenMap[tokenAddress] ? hashKit.generateColorByHash(tokenAddress) : undefined"
-                      class="tokenChip">
+              <v-chip v-for="trade in item.transferList"
+                      label class="ma-2 tradeLabel" style="max-width: 100px;">
                 {{
-                  item.tokenMap[tokenAddress] ? item.tokenMap[tokenAddress] : '**' + hashKit.headAndEnd2(tokenAddress)
+                  (trade.tokenSymbol === undefined ? ('**' + hashKit.headAndEnd2(trade.token)) : (trade.tokenSymbol === '' ? '[no name]' : trade.tokenSymbol))
                 }}
               </v-chip>
             </div>
@@ -327,6 +326,7 @@ export default {
       }
     },
     showTradeInfo(item) {
+      console.log(">>", item)
       this.transferDetailsDialog.data = item
       this.transferDetailsDialog.visible = true
     },

+ 2 - 2
src/components/viewer/newhistory/table/TradeInfoDetails.vue

@@ -8,13 +8,13 @@
           <v-chip v-if="!trade.tokenSymbol"
                   label class="ma-2 tradeLabel" @click="httpKit.jumpToExplorer(trade.token, 'token')">
             <div class="tokenName">{{ '**' + hashKit.headAndEnd2(trade.token) }}</div>
-            <div class="tokenAmount">{{ trade.amount}} </div>
+            <div class="tokenAmount">{{ trade.amount}}</div>
           </v-chip>
           <!-- 有名字的和Ethereum/EthereumPow -->
           <v-chip v-else
                   label class="ma-2 tradeLabel" :color="hashKit.generateColorByHash(trade.token)"
                   @click="httpKit.jumpToExplorer(trade.token, 'token')">
-            <div class="tokenName">{{ trade.tokenSymbol === '' ? '[no name]' : trade.tokenSymbol }}</div>
+            <div class="tokenName">{{ trade.tokenSymbol === '' ? '[no name]' : trade.tokenSymbol  }}</div>
             <div class="tokenAmount">{{ numKit.getSubFloat(trade.amount, 4)}}</div>
           </v-chip>