-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy path4214.html
50 lines (48 loc) · 1.04 KB
/
4214.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<script>
init({
title: 'Issue #4214',
desc: 'Added index field.(<a href="https://github.com/wenzhixin/bootstrap-table/issues/4214" target="_blank">#4214</a>).',
links: ['bootstrap-table.min.css'],
scripts: [
'https://cdn.jsdelivr.net/npm/[email protected]/tableExport.min.js',
'bootstrap-table.min.js',
'extensions/export/bootstrap-table-export.min.js'
]
})
</script>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-url="json/data3.json"
data-search="true"
data-show-export="true"
data-response-handler="responseHandler"
>
<thead>
<tr>
<th
data-field="index"
data-sortable="true"
>
Index
</th>
<th
data-field="github.name"
data-sortable="true"
>
Item Name
</th>
</tr>
</thead>
</table>
</template>
<script>
window.responseHandler = res => {
res.forEach(function (row, i) {
row.index = i
})
return res
}
</script>