cwg-account-limit-popup.vue 4.4 KB

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