cwg-dont-active-popup.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :show-footers="true">
  3. <view class="popup-content">
  4. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px">{{
  5. t('Custom.Withdraw.item9') }}</view>
  6. </view>
  7. <template #footer>
  8. <button @click="visible = false">{{ t('Btn.Cancel') }}</button>
  9. <button type="primary" @click="tosubmitConfirm">{{ t('Btn.Confirm') }}</button>
  10. </template>
  11. </cwg-popup>
  12. </template>
  13. <script setup>
  14. import { computed } from 'vue';
  15. import { useI18n } from 'vue-i18n';
  16. const props = defineProps({
  17. visible: {
  18. type: Boolean,
  19. default: false
  20. }
  21. });
  22. const emit = defineEmits(['update:visible', 'confirm']);
  23. const { t } = useI18n();
  24. // Watch for changes in visible prop and emit update event
  25. const visible = computed({
  26. get: () => props.visible,
  27. set: (value) => emit('update:visible', value)
  28. });
  29. const tosubmitConfirm = () => {
  30. visible.value = false;
  31. emit('confirm');
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .clause-popup {
  36. width: 90%;
  37. max-width: 800px;
  38. max-height: 80vh;
  39. overflow: hidden;
  40. .clause-content {
  41. padding: 20px;
  42. scroll-view {
  43. width: 100%;
  44. h4 {
  45. font-size: 16px;
  46. font-weight: 600;
  47. color: #303133;
  48. margin-bottom: 12px;
  49. }
  50. ul {
  51. margin-bottom: 20px;
  52. li {
  53. margin-bottom: 8px;
  54. line-height: 1.5;
  55. color: #606266;
  56. }
  57. }
  58. table {
  59. margin: 16px 0;
  60. width: 100%;
  61. border-collapse: collapse;
  62. th,
  63. td {
  64. padding: 10px;
  65. text-align: center;
  66. border: 1px solid #dcdfe6;
  67. font-size: 14px;
  68. }
  69. th {
  70. background: #f5f7fa;
  71. font-weight: 600;
  72. color: #303133;
  73. }
  74. td {
  75. color: #606266;
  76. }
  77. }
  78. // Handle v-html content
  79. div {
  80. line-height: 1.6;
  81. color: #606266;
  82. p {
  83. margin-bottom: 12px;
  84. }
  85. h1,
  86. h2,
  87. h3,
  88. h4,
  89. h5,
  90. h6 {
  91. margin: 16px 0 8px 0;
  92. color: #303133;
  93. }
  94. ul,
  95. ol {
  96. margin-left: 20px;
  97. margin-bottom: 12px;
  98. }
  99. li {
  100. margin-bottom: 4px;
  101. }
  102. }
  103. }
  104. }
  105. .clause-footer {
  106. padding: 16px 20px;
  107. border-top: 1px solid #e4e7ed;
  108. display: flex;
  109. justify-content: center;
  110. button {
  111. min-width: 120px;
  112. padding: 10px 20px;
  113. border-radius: 4px;
  114. }
  115. }
  116. }
  117. // Responsive styles
  118. @media (max-width: 768px) {
  119. .clause-popup {
  120. width: 95%;
  121. max-height: 85vh;
  122. .clause-header {
  123. padding: 12px 16px;
  124. .clause-title {
  125. font-size: 16px;
  126. }
  127. }
  128. .clause-content {
  129. padding: 16px;
  130. scroll-view {
  131. height: 50vh;
  132. h4 {
  133. font-size: 14px;
  134. }
  135. table {
  136. th,
  137. td {
  138. padding: 8px;
  139. font-size: 12px;
  140. }
  141. }
  142. }
  143. }
  144. .clause-footer {
  145. padding: 12px 16px;
  146. button {
  147. min-width: 100px;
  148. padding: 8px 16px;
  149. }
  150. }
  151. }
  152. }
  153. </style>