Created
March 25, 2020 14:36
-
-
Save vintprox/62ffc7b9ce663dc006ef7b30f075f472 to your computer and use it in GitHub Desktop.
Revisions
-
vintprox created this gist
Mar 25, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ <template> <div> <v-data-table :headers="fields" :items="objects" :sort-by="sortBy" class="elevation-1" > </v-data-table> </div> </template> <script lang="ts"> import { defineComponent, reactive, toRefs } from '@vue/composition-api'; export default defineComponent({ setup() { const state = reactive({ fields: [ { value: 'id', text: 'ID', sortable: false, align: 'start' }, { value: 'type', text: 'Type' }, { value: 'name', text: 'Name' }, { value: 'revision', text: 'Revision' } ], objects: [], sortBy: ['revision', 'name', 'type'] }); return toRefs(state); } }); </script>