<template>
	<uni-popup ref="dlRef" :animation="true" :is-mask-click="false" mask-background-color="rgba(255, 255, 255, 0.6);">
		<view>{{ tex }}</view>
		<view @click="handleConfirm">确认</view>
	</uni-popup>
</template>

<script setup>
import {ref} from "vue"

const dlRef = ref(null);
const tex = ref('兑换无效，请重新输入');

const emits =defineEmits(['confirm'])

function handleConfirm() {
	emits('confirm')
  handleClose()
}

function handleShow(msg) {
  tex.value = msg;
	dlRef.value.open('center')
}

function handleClose() {
	dlRef.value.close();
}

defineExpose({
	handleShow
})

</script>

<style scoped>

</style>