duihuanError.vue 637 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <uni-popup ref="dlRef" :animation="true" :is-mask-click="false" mask-background-color="rgba(255, 255, 255, 0.6);">
  3. <view>{{ tex }}</view>
  4. <view @click="handleConfirm">确认</view>
  5. </uni-popup>
  6. </template>
  7. <script setup>
  8. import {ref} from "vue"
  9. const dlRef = ref(null);
  10. const tex = ref('兑换无效,请重新输入');
  11. const emits =defineEmits(['confirm'])
  12. function handleConfirm() {
  13. emits('confirm')
  14. handleClose()
  15. }
  16. function handleShow(msg) {
  17. tex.value = msg;
  18. dlRef.value.open('center')
  19. }
  20. function handleClose() {
  21. dlRef.value.close();
  22. }
  23. defineExpose({
  24. handleShow
  25. })
  26. </script>
  27. <style scoped>
  28. </style>