cwg-success-popup.vue 4.0 KB

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