cwg-success-popup.vue 4.2 KB

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