You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SummaryBar.vue 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template lang="pug">
  2. section.w-flex.column.pb5
  3. nav.fill-width.w-flex.column.justify-space-between
  4. // Tabbed Layout
  5. w-tabs(
  6. :items='Object.keys(tabContent)'
  7. @input='onTabChanged'
  8. center
  9. fill-bar
  10. v-if='isTab'
  11. )
  12. template(#item-title='{ item }')
  13. .w-flex.column.justify-start
  14. p(v-if='tabContent[item].matchPerc') {{ tabContent[item].matchPerc }}%
  15. p(v-else) &nbsp;
  16. p {{ item }}
  17. // About Tab
  18. template(#item-content.1='{ item }')
  19. .tab--about
  20. p {{ tabContent[item].tab }}
  21. br
  22. p {{ tabContent[item].tab }}
  23. br
  24. hr
  25. // Passion Tab
  26. template(#item-content.2='{ item }')
  27. .tab--passion
  28. p {{ tabContent[item].tab }}
  29. SpiderChart(
  30. :labels='aspects.map(label => label.name)'
  31. :profile-data='[5.7, 5.2, 4.8, 5.2, 4.9, 4.9]'
  32. :role-data='[5.3, 4.8, 5.7, 4.8, 5.6, 4.8]'
  33. profile-name='lucy'
  34. v-if='isTab'
  35. )
  36. // Aspirations Tab
  37. template(#item-content.3='{ item }')
  38. .tab--aspirations
  39. p {{ tabContent[item].tab }}
  40. // Skills Tab
  41. template(#item-content.4='{ item }')
  42. .tab--skills
  43. p {{ tabContent[item].tab }}
  44. // Untabbed Layout
  45. ul.w-flex.row.justify-space-between(v-else)
  46. template(
  47. :key='index'
  48. v-for='(item, index) in Object.keys(tabContent)'
  49. )
  50. li.w-flex.row(v-if='item !== "about"')
  51. w-icon.mr1(xl) mdi mdi-heart
  52. .w-flex.column.justify-start
  53. p {{ tabContent[item].matchPerc }}%
  54. p {{ item }}
  55. </template>
  56. <script>
  57. import SpiderChart from './SpiderChart.vue'
  58. export default {
  59. components: { SpiderChart },
  60. props: {
  61. aspects: {
  62. required: true,
  63. type: Array,
  64. },
  65. tabContent: {
  66. required: true,
  67. type: Object,
  68. },
  69. isTab: {
  70. required: false,
  71. type: Boolean,
  72. default: false,
  73. },
  74. showIcon: {
  75. required: false,
  76. type: Boolean,
  77. default: true,
  78. },
  79. },
  80. emits: ['tab-change'],
  81. methods: {
  82. onTabChanged(tabs) {
  83. this.$emit('tab-change', tabs)
  84. },
  85. },
  86. }
  87. </script>