Skip to content
This repository was archived by the owner on Jun 10, 2021. It is now read-only.

Commit 9e7defe

Browse files
authored
Merge pull request #47 from coderdiaz/fix/remove-loader
fix/remove-loader
2 parents 1dcf966 + f407389 commit 9e7defe

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ For detailed explanation on how things work, checkout the [guide](http://vuejs-t
213213
### Contributions
214214
All contributions are welcome send your PR and Issues.
215215

216-
### Greatings
217-
[Vue Spinner by Greyby](https://github.com/greyby/vue-spinner)
218-
219216
### License
220217
This is a open-source software licensed under the [MIT license](https://raw.githubusercontent.com/coderdiaz/vue-datasource/master/LICENSE)
221218

222-
##### Created by Javier Diaz. Translation by [itsuwaribito](https://github.com/itsuwaribito)
219+
##### Crafted by Javier Diaz. Translation by [itsuwaribito](https://github.com/itsuwaribito)

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
"dependencies": {
3939
"axios": "^0.16.1",
4040
"lodash": "^4.17.4",
41-
"vue": "^2.2.6",
42-
"vue-spinner": "^1.0.2"
41+
"vue": "^2.2.6"
4342
},
4443
"devDependencies": {
4544
"autoprefixer": "^6.7.2",

src/components/ServerDatasource.vue

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import axios from 'axios'
33
import _ from 'lodash'
44
import DatasourceUtils from '../utils/DatasourceUtils'
55
import Pagination from './Pagination.vue'
6-
import MoonLoader from 'vue-spinner/src/MoonLoader.vue'
76
import { EventBus } from '../utils/EventBus'
87
export default {
98
name: 'ServerDatasource',
10-
components: {
11-
Pagination, MoonLoader
12-
},
9+
components: {Pagination},
1310
render (h) {
1411
return (
1512
<div class="vue-server-datasource">
@@ -42,7 +39,6 @@ export default {
4239
</tr>
4340
</tbody>
4441
</table>
45-
{ this.spinnerItem }
4642
</div>
4743
<div class="panel-footer">
4844
<div class="pull-left btn-group btn-group-actions">
@@ -124,7 +120,6 @@ export default {
124120
return {
125121
perpage: 10,
126122
tableData: [],
127-
loading: false,
128123
selected: null, // row and Object selected on click event
129124
indexSelected: -1, // index row selected on click event
130125
search: '', // word to search in the table,
@@ -138,13 +133,6 @@ export default {
138133
}
139134
},
140135
computed: {
141-
spinnerItem () {
142-
if (this.loading) {
143-
return <div class="vue-spinner-wrapper">
144-
<moon-loader></moon-loader>
145-
</div>
146-
}
147-
},
148136
limitOptions () {
149137
return this.limits.map((limit, index) => {
150138
return <option value={ limit } selected={ parseInt(this.perpage) === parseInt(limit) }>{ limit }</option>
@@ -203,16 +191,13 @@ export default {
203191
this.$emit('searching', this.search)
204192
},
205193
setData () {
206-
this.loading = true
207194
axios.get(`${this.source}?per_page=${this.perpage}&page=${this.pagination.current_page}&search=${this.search}`)
208195
.then((response) => {
209-
this.loading = false
210196
this.tableData = response.data.data
211197
this.pagination = response.data.pagination
212198
this.perpage = this.pagination.per_page
213199
})
214200
.catch((error) => {
215-
this.loading = false
216201
console.warn(`[VueDatasource] ${error}`)
217202
})
218203
}

0 commit comments

Comments
 (0)