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.

111 lines
2.7 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. this.$emit('booth-select', this.value);
  52. },
  53. },
  54. },
  55. methods: {
  56. add() {
  57. this.value += 1;
  58. },
  59. reduce() {
  60. if (this.value !== 0) {
  61. this.value -= 1;
  62. }
  63. },
  64. },
  65. };
  66. </script>
  67. <style lang="scss" scoped>
  68. .custom-button {
  69. background-position: center;
  70. background-repeat: no-repeat;
  71. background-size: 12px;
  72. }
  73. .button {
  74. &-reduce {
  75. background-image: url("~/assets/svg/reduce.svg");
  76. background-color: #e5e5e5;
  77. }
  78. &-add {
  79. background-image: url("~/assets/svg/add.svg");
  80. background-color: #f48800;
  81. }
  82. }
  83. .bounce-enter-active {
  84. animation: bounce-in 0.3s ease-out;
  85. }
  86. .bounce-leave-active {
  87. animation: bounce-in 0.3s reverse;
  88. }
  89. @keyframes bounce-in {
  90. 0% {
  91. opacity: 0;
  92. }
  93. 50% {
  94. opacity: 0.5;
  95. }
  96. 100% {
  97. opacity: 1;
  98. }
  99. }
  100. </style>