Skip to content

Commit 3cae675

Browse files
committed
Add cardView example and update BootstrapTable properties
1 parent c8ca17b commit 3cae675

File tree

3 files changed

+44
-4
lines changed

3 files changed

+44
-4
lines changed

docs/content/documentation/table-options/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ False to hide the table header.
8484

8585
By default this option is set to `true`.
8686

87-
Example: [showHeader](/examples/showHeader/)
87+
Example: [showHeader](/examples/showheader/)
8888

8989
<hr>
9090

@@ -106,6 +106,8 @@ True to show card view table, for example mobile view.
106106

107107
By default this option is set to `false`.
108108

109+
Example: [cardView](/examples/cardview/)
110+
109111
<hr>
110112

111113
#### locale
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: cardView
3+
weight: 35
4+
---
5+
6+
```html
7+
<div id="table">
8+
<bootstrap-table :options="options"></bootstrap-table>
9+
</div>
10+
```
11+
12+
```javascript
13+
new Vue({
14+
el: '#table',
15+
components: {
16+
'bootstrap-table': BootstrapTable
17+
},
18+
data: {
19+
options: {
20+
cardView: true,
21+
url: '/json/data0.json',
22+
columns: [
23+
{
24+
title: 'Item ID',
25+
field: 'id'
26+
},
27+
{
28+
field: 'name',
29+
title: 'Item Name'
30+
}, {
31+
field: 'price',
32+
title: 'Item Price'
33+
}
34+
]
35+
}
36+
}
37+
});
38+
```

src/BootstrapTable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,9 +1250,9 @@ var BootstrapTable = {
12501250
}
12511251
};
12521252
1253-
BootstrapTable.DEFAULTS = DEFAULTS;
1254-
BootstrapTable.COLUMN_DEFAULTS = COLUMN_DEFAULTS;
1255-
BootstrapTable.LOCALES = LOCALES;
1253+
BootstrapTable.defaults = DEFAULTS;
1254+
BootstrapTable.column_defaults = COLUMN_DEFAULTS;
1255+
BootstrapTable.locales = LOCALES;
12561256
12571257
module.exports = BootstrapTable;
12581258
</script>

0 commit comments

Comments
 (0)