This repository was archived by the owner on Jun 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change 11<script >
2- import Datasource from ' ./components/Datasource.vue'
3- import axios from ' axios'
2+ import Datasource from ' ./components/ServerDatasource.vue'
43export default {
54 name: ' app' ,
65 components: {
@@ -9,13 +8,10 @@ export default {
98 render (h ) {
109 return (
1110 < div id= " app" >
12- < datasource table - data = { this . information } limits= {this .limits } actions= {this .actions } columns= {this .columns } pagination = { this . pagination } onChange = { this . change } onSearching = { this . searching }>< / datasource>
11+ < datasource source = " http://young-falls-97690.herokuapp.com/getusers " limits= {this .limits } actions= {this .actions } columns= {this .columns }>< / datasource>
1312 < / div>
1413 )
1514 },
16- mounted () {
17- this .getData ()
18- },
1915 data () {
2016 return {
2117 information: [],
@@ -102,16 +98,6 @@ export default {
10298 }
10399 },
104100 methods: {
105- async getData () {
106- await axios .get (` http://young-falls-97690.herokuapp.com/getusers?per_page=${ this .perpage } &page=${ this .page } &search=${ this .search } ` )
107- .then ((response ) => {
108- this .pagination = response .data .pagination
109- this .information = response .data .data
110- })
111- .catch ((error ) => {
112- console .error (error)
113- })
114- },
115101 change (value ) {
116102 this .page = value .page
117103 this .perpage = value .perpage
Original file line number Diff line number Diff line change 1- import Datasource from 'src/components/Datasource .vue'
1+ import ServerDatasource from 'src/components/ServerDatasource .vue'
22
3- export { Datasource }
3+ export { ServerDatasource }
You can’t perform that action at this time.
0 commit comments