|
33 | 33 | <option :value="200">200</option> |
34 | 34 | <option :value="500">500</option> |
35 | 35 | <option :value="1000">1000</option> |
| 36 | + <option :value="1500">1500</option> |
36 | 37 | </select> |
37 | 38 | </div> |
38 | 39 |
|
|
63 | 64 | > |
64 | 65 | {{ loading ? '查询中...' : '查询' }} |
65 | 66 | </button> |
| 67 | + <!-- <button |
| 68 | + class="btn-search" |
| 69 | + @click="fetchCallData" |
| 70 | + :disabled="loading" |
| 71 | + > |
| 72 | + {{ enableCall ? '结束' : '开始' }}循环查询 |
| 73 | + </button> --> |
66 | 74 | <button class="btn-reset" @click="resetSearch">重置</button> |
67 | 75 | </div> |
68 | 76 | </div> |
|
109 | 117 | <thead> |
110 | 118 | <tr> |
111 | 119 | <!-- <th>ProxyWallet</th> --> |
| 120 | + <th>序号</th> |
112 | 121 | <th>时间</th> |
113 | 122 | <th>标题</th> |
114 | 123 | <th>结果</th> |
|
122 | 131 | <tbody> |
123 | 132 | <tr v-for="(item, index) in filteredData" :key="`${item.transactionHash}-${index}`"> |
124 | 133 | <!-- <td>{{ formatAddress(item.proxyWallet) }}</td> --> |
| 134 | + <td>{{ index + 1 }}</td> |
125 | 135 | <td>{{ formatTimestamp(item.timestamp) }}</td> |
126 | 136 | <td>{{ item.title }}</td> |
127 | 137 | <td> |
@@ -162,6 +172,7 @@ const searchParams = ref({ |
162 | 172 | const rawData = ref([]); |
163 | 173 | const loading = ref(false); |
164 | 174 | const error = ref(null); |
| 175 | +const enableCall = ref(false); |
165 | 176 |
|
166 | 177 | const responseTimeMs = ref(null); |
167 | 178 |
|
@@ -196,7 +207,7 @@ const fetchData = async () => { |
196 | 207 | } |
197 | 208 |
|
198 | 209 | |
199 | | - const allowedLimits = [5, 10, 25, 50, 100, 200, 500, 1000]; |
| 210 | + const allowedLimits = [5, 10, 25, 50, 100, 200, 500, 1000, 1500]; |
200 | 211 | const limit = Number(searchParams.value.limit); |
201 | 212 | if (!Number.isInteger(limit) || limit <= 0 || !allowedLimits.includes(limit)) { |
202 | 213 | error.value = `limit 值不合法,请选择:${allowedLimits.join(', ')}`; |
@@ -262,6 +273,9 @@ const fetchData = async () => { |
262 | 273 | } |
263 | 274 | }; |
264 | 275 |
|
| 276 | +const fetchCallData = async () => { |
| 277 | + setInterval(fetchData, 1000); |
| 278 | +} |
265 | 279 | // ✅ 新增:提取模拟数据到单独函数 |
266 | 280 | const getMockData = () => { |
267 | 281 | return [ |
|
0 commit comments