Created
December 29, 2017 19:26
-
-
Save devalexandre/d26fa5fa194d8158dbf4797edb930add to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="layout-padding"> | |
<q-data-table | |
:data="table" | |
:config="config" | |
:columns="columns" | |
/> | |
</div> | |
</template> | |
<script> | |
import { QDataTable, QBtn, QTooltip } from 'quasar' | |
export default { | |
component: { | |
QDataTable, | |
QBtn, | |
QTooltip | |
}, | |
data () { | |
return { | |
table: [ | |
{ | |
id: 1, | |
company: 'Pizza Na Roça', | |
status: 'Não Atendido' | |
} | |
], | |
columns: [ | |
{ | |
label: '#', | |
field: 'id', | |
width: '3rem' | |
}, | |
{ | |
label: 'Empresa', | |
field: 'company', | |
width: '3rem' | |
}, | |
{ | |
label: 'status', | |
field: 'status', | |
width: '3rem' | |
} | |
], | |
config: { | |
title: 'Data Table', | |
refresh: false, | |
noHeader: false, | |
columnPicker: true, | |
leftStickyColumns: 0, | |
rightStickyColumns: 2, | |
bodyStyle: { | |
maxHeight: '500px' | |
}, | |
rowHeight: '50px', | |
responsive: true, | |
pagination: { | |
rowsPerPage: 15, | |
options: [5, 10, 15, 30, 50, 500] | |
}, | |
selection: 'multiple' | |
} | |
} | |
} | |
} | |
</script> | |
<style lang="stylus"> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment