Skip to content

Commit 1ebdc93

Browse files
author
syshex
committed
1.1.7
1 parent 74731b6 commit 1ebdc93

11 files changed

+167
-11239
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 1.1.7 (August 10, 2017)
4+
5+
* Allowing Axios configuration to be passed for the requests
6+
37
### 1.1.6 (June 29, 2017)
48

59
* Search case sensitivity configurable

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
vue-bootstrap-table is a sortable and searchable table, with Bootstrap styling, for Vue.js.
44

5-
### VUE 2 : 1.1.6
5+
### VUE 2 : 1.1.7
66

77
### Vue 1 : [jbaysolutions/vue-bootstrap-table](https://github.com/jbaysolutions/vue-bootstrap-table)
88

@@ -220,6 +220,7 @@ Or add the js script to your html (download from [releases](https://github.com/j
220220
url: "",
221221
method: "GET",
222222
delegate: false,
223+
axiosConfig: {}
223224
}
224225
}
225226
},
@@ -336,7 +337,7 @@ Ajax Object properties:
336337
* url: the URL where to request the data
337338
* methods: GET and POST are the valid methods allowed
338339
* delegate: False = just get all the data and do processing on browser; True = Ask for data as needed, and all processing is done on the server side.
339-
340+
* axiosConfig: check [Axios Page](https://github.com/mzabriskie/axios) for information regarding Method Config.
340341

341342
#### Example AJAX config for Remote Loading
342343

@@ -348,6 +349,7 @@ ajax: {
348349
url: "http://localhost:9430/data/test",
349350
method: "GET",
350351
delegate: false,
352+
axiosConfig: {}
351353
},
352354
```
353355

@@ -361,6 +363,11 @@ ajax: {
361363
url: "http://localhost:9430/data/test",
362364
method: "GET",
363365
delegate: true,
366+
axiosConfig: {
367+
headers: {
368+
'Authorization': 'Bearer TESTTESTTESTTESTTEST'
369+
}
370+
}
364371
},
365372
```
366373

@@ -481,6 +488,10 @@ If you have a feature request, please add it as an issue or make a pull request.
481488

482489
## Changelog
483490

491+
### 1.1.7
492+
493+
* Allowing Axios configuration to be passed for the requests
494+
484495
### 1.1.6
485496

486497
* Search case sensitivity configurable

dist/vue-bootstrap-table-RC.js

Lines changed: 0 additions & 11118 deletions
This file was deleted.

dist/vue-bootstrap-table-RC.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/vue-bootstrap-table-RC.min.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

dist/vue-bootstrap-table.js

Lines changed: 134 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-bootstrap-table.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-bootstrap-table.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2-bootstrap-table2",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "A sortable and searchable vue table, as a Vue component, using bootstrap styling.",
55
"keywords": [
66
"table",

src/VueBootstrapTable.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
url: "",
313313
method: "GET",
314314
delegate: false,
315+
axiosConfig: {}
315316
}
316317
}
317318
},
@@ -518,6 +519,9 @@
518519
tColsDir.push(this.sortOrders[this.sortKey[i]].toLowerCase());
519520
}
520521
if ( this.ajax.method=== "GET" ) {
522+
//COPY
523+
ajaxParameters = JSON.parse(JSON.stringify(this.ajax.axiosConfig));
524+
ajaxParameters.params = {};
521525
ajaxParameters.params.sortcol = this.sortKey;
522526
ajaxParameters.params.sortdir = tColsDir;
523527
ajaxParameters.params.filter = this.filterKey;
@@ -561,7 +565,7 @@
561565
});
562566
}
563567
if (this.ajax.enabled && this.ajax.method === "POST") {
564-
axios.post(self.ajax.url, qs.stringify(ajaxParameters) )
568+
axios.post(self.ajax.url, qs.stringify(ajaxParameters) , this.ajax.axiosConfig )
565569
.then(response => {
566570
if (this.ajax.delegate) {
567571
if (response.data.echo !== self.echo) {

src/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ new Vue({
2626
ajax: {
2727
enabled: false,
2828
url: "http://localhost:9430/data/test",
29-
method: "POST",
29+
method: "GET",
3030
delegate: true,
31+
axiosConfig:{
32+
headers: {
33+
'Authorization': 'Bearer TESTTESTTESTTESTTEST'
34+
}
35+
}
3136
},
3237
columns: [
3338
{

0 commit comments

Comments
 (0)