banbenConfirmDialog.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="phone-tip-dialog sxtk-sc-dialog">
  6. <view class="tip-content-box">
  7. <view class="tip-title">{{title}}</view>
  8. <view class="tip-content sxtk-content" v-if="content">
  9. <view class="content-text">{{content}}</view>
  10. </view>
  11. <view class="tip-btn-box sxtk-btn-box">
  12. <view class="confirm-btn down-btn" @click="confirmBtn">下载到手机</view>
  13. <view class="not-confirm-btn cancel-btn" @click="handleClose">取消</view>
  14. </view>
  15. </view>
  16. </view>
  17. </uni-popup>
  18. </template>
  19. <script setup>
  20. import { ref } from 'vue';
  21. const props = defineProps({
  22. title: {
  23. type: String,
  24. default: '温馨提示'
  25. },
  26. content: {
  27. type: String,
  28. default: ''
  29. },
  30. });
  31. const tipBigPopup = ref(null); // 索引
  32. const $emit = defineEmits(['confirm-btn'])
  33. // 打开弹窗
  34. function handleShow() {
  35. tipBigPopup.value.open();
  36. }
  37. // 取消
  38. function handleClose() {
  39. tipBigPopup.value.close();
  40. }
  41. // 确认
  42. function confirmBtn(){
  43. $emit('confirm-btn');
  44. tipBigPopup.value.close();
  45. }
  46. defineExpose({
  47. handleShow,
  48. handleClose
  49. })
  50. </script>
  51. <style>
  52. </style>