cwg-improve-popup.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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" v-t="'Home.msg.content1'"></view>
  5. <view class="icon">
  6. <cwg-icon name="mdi-shield-lock-outline" :size="80" color="#303133" />
  7. </view>
  8. <view class="des2" v-t="'Home.msg.content2'"></view>
  9. <view class="des2" v-t="'Home.msg.content3'"></view>
  10. </view>
  11. <template #footer>
  12. <button @click="closeDia">{{ t('Btn.Cancel') }}</button>
  13. <button type="primary" @click="confirm">{{ t('Home.msg.btnImmediately') }}</button>
  14. </template>
  15. </cwg-popup>
  16. </template>
  17. <script setup>
  18. import { computed } from 'vue';
  19. import { useI18n } from 'vue-i18n';
  20. const props = defineProps({
  21. visible: {
  22. type: Boolean,
  23. default: false
  24. },
  25. });
  26. const emit = defineEmits(['update:visible', 'confirm']);
  27. const { t } = useI18n();
  28. // Watch for changes in visible prop and emit update event
  29. const visible = computed({
  30. get: () => props.visible,
  31. set: (value) => emit('update:visible', value)
  32. });
  33. const closeDia = () => {
  34. visible.value = false;
  35. }
  36. const confirm = () => {
  37. visible.value = false;
  38. emit('confirm');
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .des1{
  43. font-size: px2rpx(16);
  44. line-height: 1.6;
  45. margin: px2rpx(30) 0 px2rpx(50);
  46. color: #303133;
  47. }
  48. </style>