ProductCard.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template lang="pug">
  2. .product-card
  3. h2.product-title {{ data.name }}
  4. img.product-image(src="/web/static/src/img/placeholder.png")
  5. .product-price
  6. span Gs {{ data.list_price }}
  7. .product-qty
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. data: {
  13. type: Object,
  14. default: () => {
  15. return {}
  16. }
  17. }
  18. }
  19. }
  20. </script>
  21. <style lang="sass">
  22. .product-card
  23. width: 130px
  24. height: 160px
  25. border: 1px solid #d3d3d3
  26. display: inline-block
  27. position: relative
  28. .product-title
  29. width: 100%
  30. height: 30px
  31. font-size: 12pt
  32. text-align: center
  33. margin-top: 12px
  34. position: absolute
  35. top: 0
  36. .product-image
  37. width: 85px
  38. height: 85px
  39. margin: 0
  40. border: none
  41. position: absolute;
  42. top: 50%
  43. left: 50%
  44. margin-right: -50%
  45. transform: translate(-50%, -50%)
  46. .product-price
  47. width: 100%
  48. height: 30px
  49. padding-top: 5px
  50. text-align: center
  51. font-size: 12pt
  52. font-weight: bold
  53. background: #2196f3
  54. color: #fff
  55. position: absolute
  56. bottom: 0
  57. </style>