-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy path986.html
62 lines (58 loc) · 1.3 KB
/
986.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
<script>
init({
title: 'Issue #986',
desc: 'Editable select box(<a href="https://github.com/wenzhixin/bootstrap-table/issues/986" target="_blank">#986</a>).',
links: [
'https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap3-editable/css/bootstrap-editable.css',
'bootstrap-table.min.css'
],
scripts: [
'https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap3-editable/js/bootstrap-editable.min.js',
'bootstrap-table.min.js',
'extensions/editable/bootstrap-table-editable.min.js'
]
})
</script>
<template>
<table id="table"></table>
</template>
<script>
const data = [
{
name: 'active'
},
{
name: 'blocked'
},
{
name: 'deleted'
}
]
const $table = $('#table')
function mounted () {
$table.bootstrapTable({
idField: 'name',
columns: [
{
field: 'state',
title: '',
checkbox: true
},
{
field: 'name',
title: 'names',
sortable: true,
editable: {
type: 'select',
source: [
{ value: 'active', text: 'Active' },
{ value: 'blocked', text: 'Blocked' },
{ value: 'deleted', text: 'Deleted' }
]
}
}
],
data
})
}
</script>