Skip to content
Snippets Groups Projects

Resolve "Move data things to data service and have correct interfaces"

6 files
+ 36
11
Compare changes
  • Side-by-side
  • Inline

Files

<template>
<template>
<div>
<div>
<v-data-table
<v-data-table-server
flat
flat
:headers="headers"
:headers="headers"
:items="result.rows"
:loading="loading > 0"
:loading="loading > 0"
:options.sync="options"
:options="options"
 
:items="result.rows"
 
:items-length="total"
:footer-props="footerProps"
:footer-props="footerProps"
:server-items-length="total" />
@update:options="updateOptions" />
</div>
</div>
</template>
</template>
@@ -42,7 +43,7 @@ export default {
@@ -42,7 +43,7 @@ export default {
showFirstLastPage: true,
showFirstLastPage: true,
itemsPerPageOptions: [10, 25, 50, 100]
itemsPerPageOptions: [10, 25, 50, 100]
},
},
total: null
total: null,
}
}
},
},
computed: {
computed: {
@@ -150,6 +151,11 @@ export default {
@@ -150,6 +151,11 @@ export default {
})
})
console.debug('query result', data)
console.debug('query result', data)
this.result.rows = data.result
this.result.rows = data.result
 
},
 
updateOptions ({ page, itemsPerPage, sortBy }) {
 
this.options.page = page
 
this.options.itemsPerPage = itemsPerPage
 
this.reExecute(this.id)
}
}
}
}
}
}
Loading