tipDialog.vue 809 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <uni-popup ref="tipPopup" :animation="false" :is-mask-click="false"
  3. mask-background-color="rgba(0, 0, 0, 0.4)">
  4. <view class="phone-tip-dialog">
  5. <view class="common-body-box">
  6. <view class="tip-title">{{title}}</view>
  7. <view class="tip-content" :class="dialogContentClass">{{content}}</view>
  8. </view>
  9. </view>
  10. </uni-popup>
  11. </template>
  12. <script setup>
  13. import { ref } from 'vue';
  14. const props = defineProps({
  15. title: {
  16. type: String,
  17. default: ''
  18. },
  19. content: {
  20. type: String,
  21. require: true,
  22. default: ''
  23. },
  24. });
  25. const tipPopup = ref(null); // 索引
  26. const $emit = defineEmits(['confirm-btn'])
  27. // 打开弹窗
  28. function handleShow() {
  29. tipPopup.value.open();
  30. }
  31. defineExpose({
  32. handleShow
  33. })
  34. </script>
  35. <style>
  36. </style>