Skip to content

Instantly share code, notes, and snippets.

@srhise
Created November 22, 2016 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srhise/3e4d9ed6949535b9801ade9756201294 to your computer and use it in GitHub Desktop.
Save srhise/3e4d9ed6949535b9801ade9756201294 to your computer and use it in GitHub Desktop.
<template>
<div class="grid">
<div class="column-headings">
<div class="column" v-for="column in columns">
{{column.name}}
<a v-if="column.sortable === true"><i class="fa fa-caret-down"></i></a>
</div>
</div>
<div class="grid-rows">
<div class="grid-row" v-for="row in data">
<div v-for="column in columns">
{{row[column.property]}}
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: ['data', 'columns']
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment