tipBigDialog.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!-- 大弹窗 三~四行文字 -->
  2. <template>
  3. <uni-popup ref="tipBigPopup" :animation="false" :is-mask-click="false"
  4. mask-background-color="rgba(0,0,0, 0.76);">
  5. <view class="ezy-tip-dialog tip-big-dialog">
  6. <view class="tip-content-box">
  7. <view class="tip-title">{{title}}</view>
  8. <view class="tip-content" v-if="content">{{content}}</view>
  9. <view class="tip-img" v-if="imgShow"></view>
  10. <view class="tip-btn-box">
  11. <ezyActiveVue class="ezy-btn-active not-confirm-btn" @aclick="handleClose"></ezyActiveVue>
  12. <ezyActiveVue class="ezy-btn-active confirm-btn" @aclick="confirmBtn"></ezyActiveVue>
  13. </view>
  14. </view>
  15. </view>
  16. </uni-popup>
  17. </template>
  18. <script setup>
  19. import { ref } from 'vue';
  20. import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
  21. const props = defineProps({
  22. title: {
  23. type: String,
  24. default: '提示'
  25. },
  26. imgShow: {
  27. type: Boolean,
  28. default: false,
  29. },
  30. content: {
  31. type: String,
  32. default: ''
  33. },
  34. });
  35. const tipBigPopup = ref(null); // 索引
  36. const $emit = defineEmits(['confirm-btn'])
  37. // 打开弹窗
  38. function handleShow() {
  39. tipBigPopup.value.open();
  40. }
  41. // 取消
  42. function handleClose() {
  43. tipBigPopup.value.close();
  44. }
  45. // 确认
  46. function confirmBtn(){
  47. $emit('confirm-btn');
  48. tipBigPopup.value.close();
  49. }
  50. defineExpose({
  51. handleShow
  52. })
  53. </script>
  54. <style>
  55. </style>