-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathmultiple-sort.html
66 lines (63 loc) · 1.25 KB
/
multiple-sort.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<script>
init({
title: 'Multiple Sort',
desc: 'Use Plugin: bootstrap-table-multiple-sort.',
links: ['bootstrap-table.min.css'],
scripts: [
'bootstrap-table.min.js',
'extensions/multiple-sort/bootstrap-table-multiple-sort.js'
]
})
</script>
<template>
<table id="table">
<thead>
<tr>
<th
data-field="github.name"
data-sortable="true"
>
Name
</th>
<th
data-field="github.count.stargazers"
data-sortable="true"
>
Stargazers
</th>
<th
data-field="github.count.forks"
data-sortable="true"
>
Forks
</th>
<th
data-field="github.description"
data-sortable="true"
>
Description
</th>
</tr>
</thead>
</table>
</template>
<script>
function mounted () {
$('#table').bootstrapTable({
search: true,
showColumns: true,
showMultiSort: true,
sortPriority: [
{
sortName: 'github.count.forks',
sortOrder: 'desc'
},
{
sortName: 'github.count.stargazers',
sortOrder: 'desc'
}
],
url: 'json/data3.json'
})
}
</script>