Skip to content

Instantly share code, notes, and snippets.

@vintprox
Created March 25, 2020 14:36
Show Gist options
  • Save vintprox/62ffc7b9ce663dc006ef7b30f075f472 to your computer and use it in GitHub Desktop.
Save vintprox/62ffc7b9ce663dc006ef7b30f075f472 to your computer and use it in GitHub Desktop.

Revisions

  1. vintprox created this gist Mar 25, 2020.
    31 changes: 31 additions & 0 deletions BusinessObjectSearch.vue
    Original 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>