RowItem.vue 793 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <ElRow style="width: 100%; margin: 3px 0;height: 32px" :gutter="12">
  3. <ElCol :span="labelSpan" class="label-col">
  4. {{label}}
  5. </ElCol>
  6. <ElCol :span="valueSpan" class="value-col">
  7. <slot></slot>
  8. </ElCol>
  9. </ElRow>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'RowItem',
  14. props: {
  15. labelSpan: {
  16. type: Number,
  17. default: 8,
  18. },
  19. valueSpan: {
  20. type: Number,
  21. default: 16,
  22. },
  23. label: {
  24. type: String,
  25. },
  26. },
  27. };
  28. </script>
  29. <style scoped>
  30. .label-col{
  31. display: flex;
  32. justify-content: flex-end;
  33. align-items: center;
  34. flex-direction: row;
  35. height: 100%;
  36. color: darkcyan;
  37. }
  38. .value-col{
  39. display: flex;
  40. flex-direction: row;
  41. justify-content: flex-start;
  42. align-items: center;
  43. height: 100%;
  44. }
  45. </style>