ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

http-fetch not showing data #194

Open rala-4 opened 2 years ago

rala-4 commented 2 years ago

I'm using Axios to request the data from the API with access token and get the data but not showing in the table may I know why <vuetable ref="vuetable" class="table-divided order-with-arrow responsive-table" :query-params="makeQueryParams" :per-page="perPage" :reactive-api-url="true" :fields="fields" pagination-path :http-fetch="getData" :row-class="onRowClass" @vuetable:load-error="requestFail" @vuetable:pagination-data="onPaginationData"

getData(apiUrl,httpOptions){ // console.log(apiUrl,httpOptions,'httpOptions'); await axios .get(${this.apiBase},httpOptions) .then(response => { console.log(response.data,'ssdasdsa'); // this.loadSuccess(response); this.isLoad =true; return response; }).catch(e => { console.log(e); }) },