龚成明 пре 3 година
родитељ
комит
3580c7c6a4
1 измењених фајлова са 23 додато и 11 уклоњено
  1. 23 11
      src/components/History.vue

+ 23 - 11
src/components/History.vue

@@ -45,8 +45,7 @@
             md="1"
         >
           <v-btn outlined x-large tile color="primary" @click="pullData">
-            <v-icon left>mdi-cloud-search-outline</v-icon>
-            Search
+            <v-icon>mdi-cloud-search-outline</v-icon>
           </v-btn>
         </v-col>
       </v-row>
@@ -68,17 +67,29 @@
       </v-card-title>
 
       <v-data-table
-        dense
-        hide-default-footer
         multi-sort
         :headers="headers"
         :items="tableData"
         :search="search"
-        :items-per-page="10000"
+        :items-per-page="200"
         :loading="loading"
-        :sort-by="['ts', 'block', 'nonce']"
-        :sort-desc="[true, true, true]"
       >
+        <!--        :sort-by="['ts', 'block', 'nonce']"-->
+        <!--        :sort-desc="[true, true, true]"-->
+        <template v-slot:item.option="{ item }">
+          <v-row>
+            <v-col cols="5">
+              <v-btn icon elevation="0" color="blue" small>
+                <v-icon small>mdi-pencil-outline</v-icon>
+              </v-btn>
+            </v-col>
+            <v-col cols="5">
+              <v-btn icon elevation="0" color="red" small>
+                <v-icon small>mdi-delete-forever-outline</v-icon>
+              </v-btn>
+            </v-col>
+          </v-row>
+        </template>
         <!-- Block -->
         <template v-slot:item.block="{ item }">
           {{ item.block }}
@@ -87,7 +98,7 @@
         <template v-slot:item.hash="{ item }">
           <v-tooltip right>
             <template v-slot:activator="{ on, attrs }">
-              <v-btn small :href="'https://etherscan.io/tx/' + item.hash" target="_blank" text v-on="on" v-bind="attrs">{{ getSimpleStr(item.hash) }}</v-btn>
+              <v-btn x-small :href="'https://etherscan.io/tx/' + item.hash" target="_blank" text v-on="on" v-bind="attrs">{{ getSimpleStr(item.hash) }}</v-btn>
             </template>
             <span>{{ item.hs }}</span>
           </v-tooltip>
@@ -216,10 +227,11 @@
       search: '',
       loading: false,
       headers: [
-        { text: 'block', value: 'block' },
+        { text: "Option", value: 'option', width: '100' },
+        { text: 'Block', value: 'block', width: '120' },
         // { text: 'Sender', value: 'fm' },
-        { text: 'hash', value: 'hash' },
-        { text: 'data', value: 'data' },
+        { text: 'Hash', value: 'hash' },
+        { text: 'Data', value: 'data' },
         // { text: '交易数量', value: 'amount' },
         // { text: '利润', value: 'profit' },
         // { text: 'Gas', value: 'gas' },