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.

108 lines
2.6 KiB

  1. <template>
  2. <div class="group">
  3. <div class="tw-text-[16px] tw-text-[#9c9c9c] tw-mb-[20px]">
  4. 大大會提供每實收攤位(贈攤不計列)單件 7 噸內至多 3 件免費服務請詳實填寫逾期申請或現場追加恕不受理
  5. </div>
  6. <div class="tw-grid tw-grid-cols-[199px_auto] tw-gap-[15px]">
  7. <div class="tw-text-[16px] tw-text-black">
  8. 實收攤位數 <span class="tw-text-[12px]">(9平方米/攤位)</span><span class="tw-text-[#ef5a5a]">*</span>
  9. </div>
  10. <div class="tw-flex tw-justify-between tw-items-center tw-max-w-[165px]">
  11. <!-- <div class="t12 tw-mr-[35px] tw-text-neutrals-900 tw-hidden md:tw-block md:t16 md:tw-font-normal">
  12. ${{ price.toLocaleString() }} {{ currency }}
  13. </div> -->
  14. <button :class="[
  15. 'custom-button button-reduce tw-text-transparent tw-p-[6px] tw-rounded-[8px] tw-max-w-[24px] tw-max-h-[24px] tw-mr-[16px] md:tw-max-w-[30px] md:tw-max-h-[30px] md:tw-mr-[42px]',
  16. value == 0 ? 'tw-bg-neutrals-200' : 'tw-bg-primary-default',
  17. ]" @click="reduce()">
  18. reduce
  19. </button>
  20. <div class="tw-min-w-[24px] tw-text-center md:t18 md:tw-font-normal">
  21. {{ value }}
  22. </div>
  23. <button :class="[
  24. 'custom-button button-add tw-text-transparent tw-p-[6px] tw-rounded-[8px] tw-max-w-[24px] tw-max-h-[24px] tw-ml-[16px] md:tw-max-w-[30px] md:tw-max-h-[30px] md:tw-text-medium md:tw-ml-[42px]',
  25. ]" @click="add()">
  26. add
  27. </button>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'selectExhibitionBooth',
  35. components: {
  36. },
  37. props: {
  38. },
  39. data() {
  40. return {
  41. value: 0,
  42. };
  43. },
  44. watch: {
  45. value: {
  46. handler: function () {
  47. if (this.value) {
  48. console.log(this.value);
  49. this.$emit('booth-select', this.value);
  50. }
  51. },
  52. },
  53. },
  54. methods: {
  55. add() {
  56. this.value += 1;
  57. },
  58. reduce() {
  59. if (this.value !== 0) {
  60. this.value -= 1;
  61. }
  62. },
  63. },
  64. };
  65. </script>
  66. <style lang="scss" scoped>
  67. .custom-button {
  68. background-position: center;
  69. background-repeat: no-repeat;
  70. background-size: 12px;
  71. }
  72. .button {
  73. &-reduce {
  74. background-image: url("~/assets/svg/reduce.svg");
  75. background-color: #e5e5e5;
  76. }
  77. &-add {
  78. background-image: url("~/assets/svg/add.svg");
  79. background-color: #f48800;
  80. }
  81. }
  82. .bounce-enter-active {
  83. animation: bounce-in 0.3s ease-out;
  84. }
  85. .bounce-leave-active {
  86. animation: bounce-in 0.3s reverse;
  87. }
  88. @keyframes bounce-in {
  89. 0% {
  90. opacity: 0;
  91. }
  92. 50% {
  93. opacity: 0.5;
  94. }
  95. 100% {
  96. opacity: 1;
  97. }
  98. }
  99. </style>