Skip to content

Commit ae1e026

Browse files
author
syshex
committed
1.1.7
1 parent e29168f commit ae1e026

File tree

8 files changed

+166
-111
lines changed

8 files changed

+166
-111
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 1 : 1.1.6
5+
### VUE 1 : 1.1.7
66

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

@@ -219,6 +219,7 @@ Or add the js script to your html (download from [releases](https://github.com/j
219219
url: "",
220220
method: "GET",
221221
delegate: false,
222+
axiosConfig: {}
222223
}
223224
}
224225
},
@@ -329,7 +330,7 @@ Ajax Object properties:
329330
* url: the URL where to request the data
330331
* methods: GET and POST are the valid methods allowed
331332
* 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.
332-
333+
* axiosConfig: check [Axios Page](https://github.com/mzabriskie/axios) for information regarding Method Config.
333334

334335
#### Example AJAX config for Remote Loading
335336

@@ -341,6 +342,7 @@ ajax: {
341342
url: "http://localhost:9430/data/test",
342343
method: "GET",
343344
delegate: false,
345+
axiosConfig: {}
344346
},
345347
```
346348

@@ -354,6 +356,11 @@ ajax: {
354356
url: "http://localhost:9430/data/test",
355357
method: "GET",
356358
delegate: true,
359+
axiosConfig: {
360+
headers: {
361+
'Authorization': 'Bearer TESTTESTTESTTESTTEST'
362+
}
363+
}
357364
},
358365
```
359366

@@ -471,6 +478,10 @@ If you have a feature request, please add it as an issue or make a pull request.
471478

472479
## Changelog
473480

481+
### 1.1.7
482+
483+
* Allowing Axios configuration to be passed for the requests
484+
474485
### 1.1.6
475486

476487
* Search case sensitivity configurable

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": "vue-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
},
@@ -505,6 +506,9 @@
505506
tColsDir.push(this.sortOrders[this.sortKey[i]].toLowerCase());
506507
}
507508
if ( this.ajax.method=== "GET" ) {
509+
//COPY
510+
ajaxParameters = JSON.parse(JSON.stringify(this.ajax.axiosConfig));
511+
ajaxParameters.params = {};
508512
ajaxParameters.params.sortcol = this.sortKey;
509513
ajaxParameters.params.sortdir = tColsDir;
510514
ajaxParameters.params.filter = this.filterKey;
@@ -549,7 +553,7 @@
549553
});
550554
}
551555
if (this.ajax.enabled && this.ajax.method === "POST") {
552-
axios.post(self.ajax.url, qs.stringify(ajaxParameters) )
556+
axios.post(self.ajax.url, qs.stringify(ajaxParameters) , this.ajax.axiosConfig )
553557
.then(response => {
554558
if (this.ajax.delegate) {
555559
if (response.data.echo !== self.echo) {

src/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ new Vue({
3131
url: "http://localhost:9430/data/test",
3232
method: "POST",
3333
delegate: true,
34+
axiosConfig:{
35+
headers: {
36+
'Authorization': 'Bearer TESTTESTTESTTESTTEST'
37+
}
38+
}
3439
},
3540
columns: [
3641
{

0 commit comments

Comments
 (0)