tipBigDialog.vue 1.2 KB

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