cwg-function-disabled-popup.vue 4.2 KB

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