Skip to content

Commit 1e2ee64

Browse files
committed
Update index.vue
1 parent 5b036fa commit 1e2ee64

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/polymarket/index.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<option :value="200">200</option>
3434
<option :value="500">500</option>
3535
<option :value="1000">1000</option>
36+
<option :value="1500">1500</option>
3637
</select>
3738
</div>
3839

@@ -63,6 +64,13 @@
6364
>
6465
{{ loading ? '查询中...' : '查询' }}
6566
</button>
67+
<!-- <button
68+
class="btn-search"
69+
@click="fetchCallData"
70+
:disabled="loading"
71+
>
72+
{{ enableCall ? '结束' : '开始' }}循环查询
73+
</button> -->
6674
<button class="btn-reset" @click="resetSearch">重置</button>
6775
</div>
6876
</div>
@@ -109,6 +117,7 @@
109117
<thead>
110118
<tr>
111119
<!-- <th>ProxyWallet</th> -->
120+
<th>序号</th>
112121
<th>时间</th>
113122
<th>标题</th>
114123
<th>结果</th>
@@ -122,6 +131,7 @@
122131
<tbody>
123132
<tr v-for="(item, index) in filteredData" :key="`${item.transactionHash}-${index}`">
124133
<!-- <td>{{ formatAddress(item.proxyWallet) }}</td> -->
134+
<td>{{ index + 1 }}</td>
125135
<td>{{ formatTimestamp(item.timestamp) }}</td>
126136
<td>{{ item.title }}</td>
127137
<td>
@@ -162,6 +172,7 @@ const searchParams = ref({
162172
const rawData = ref([]);
163173
const loading = ref(false);
164174
const error = ref(null);
175+
const enableCall = ref(false);
165176
166177
const responseTimeMs = ref(null);
167178
@@ -196,7 +207,7 @@ const fetchData = async () => {
196207
}
197208
198209
199-
const allowedLimits = [5, 10, 25, 50, 100, 200, 500, 1000];
210+
const allowedLimits = [5, 10, 25, 50, 100, 200, 500, 1000, 1500];
200211
const limit = Number(searchParams.value.limit);
201212
if (!Number.isInteger(limit) || limit <= 0 || !allowedLimits.includes(limit)) {
202213
error.value = `limit 值不合法,请选择:${allowedLimits.join(', ')}`;
@@ -262,6 +273,9 @@ const fetchData = async () => {
262273
}
263274
};
264275
276+
const fetchCallData = async () => {
277+
setInterval(fetchData, 1000);
278+
}
265279
// ✅ 新增:提取模拟数据到单独函数
266280
const getMockData = () => {
267281
return [

0 commit comments

Comments
 (0)