SupplierCard.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template lang="pug">
  2. .supplier-card
  3. h2.supplier-name {{ item.name }}
  4. img.supplier-image(:src="!!item.imageMedium ? 'data:image/png;base64,' + item.imageMedium : 'base/static/src/img/avatar.png'")
  5. </template>
  6. <script>
  7. import { mapActions, mapGetters } from 'vuex'
  8. export default {
  9. props: {
  10. item: {
  11. type: Object,
  12. default: {}
  13. }
  14. }
  15. }
  16. </script>
  17. <style lang="sass">
  18. .supplier-card
  19. width: 130px
  20. height: 160px
  21. margin: 5px
  22. border: 1px solid #d3d3d3
  23. display: inline-block
  24. position: relative
  25. &.supplier-selected
  26. transition-duration: 300ms
  27. border-bottom: 3px solid #7c7bad
  28. &:hover
  29. cursor: pointer
  30. .supplier-name
  31. width: 100%
  32. height: 30px
  33. font-size: 9pt
  34. text-align: center
  35. margin-top: 10px
  36. position: absolute
  37. top: 0
  38. .supplier-image
  39. width: 80px
  40. height: 80px;
  41. margin: 0
  42. border: none
  43. position: absolute
  44. top: 50%
  45. left: 50%
  46. margin-right: -50%
  47. transform: translate(-50%, -50%)
  48. </style>