EntityIndexGridItem.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <q-card :flat="flat"
  3. class="EntityIndexGridItem">
  4. <q-card-section v-if="inputData.props?.cols && inputData.props.cols.length > 0">
  5. <div v-for="(col, colIndex) in inputData.props.cols"
  6. :key="colIndex"
  7. class="table-column">
  8. <slot name="col"
  9. :col="col"
  10. :row="inputData.props.row">
  11. <div class="label"
  12. v-html="col.label" />
  13. <div class="value"
  14. v-html="col.field(inputData.props.row)" />
  15. </slot>
  16. </div>
  17. </q-card-section>
  18. </q-card>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'EntityIndexGridItem',
  23. props: {
  24. inputData: {
  25. type: Object,
  26. default () {
  27. return {}
  28. }
  29. },
  30. flat: {
  31. type: Boolean,
  32. default: false
  33. }
  34. },
  35. methods: {}
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .EntityIndexGridItem {
  40. width: 100%;
  41. margin-bottom: 8px;
  42. .table-column {
  43. margin-bottom: 16px;
  44. .label {
  45. color: #616161;
  46. }
  47. .value {}
  48. }
  49. }
  50. </style>