daoTipDialog.vue 714 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <uni-popup ref="daoTipPopup" type="bottom" :is-mask-click="false">
  3. <view class="dao-popup-box">
  4. <view class="dao-popup-img" :style="{backgroundImage: 'url(' + productTip + ')'}"></view>
  5. <view class="dao-popup-btn" @click="handleClose"></view>
  6. </view>
  7. </uni-popup>
  8. </template>
  9. <script setup>
  10. import {ref} from "vue";
  11. const props = defineProps({
  12. productTip: {
  13. type: String,
  14. default: ''
  15. },
  16. });
  17. const daoTipPopup = ref(null);
  18. const $emit = defineEmits(['dao-tip-close'])
  19. function handleShow() {
  20. daoTipPopup.value.open();
  21. }
  22. function handleClose() {
  23. daoTipPopup.value.close();
  24. $emit('dao-tip-close');
  25. }
  26. defineExpose({
  27. handleShow
  28. })
  29. </script>
  30. <style>
  31. </style>