|
@@ -0,0 +1,40 @@
|
|
|
+<template>
|
|
|
+ <uni-popup ref="exitPopup" :animation="false" :is-mask-click="false"
|
|
|
+ mask-background-color="rgba(255, 255, 255, 0.6);">
|
|
|
+ <view class="exit-dialog">
|
|
|
+ <view class="exit-content-box">
|
|
|
+ <view class="exit-title">提示</view>
|
|
|
+ <view class="exit-two-title">你确定要执行这个操作吗?</view>
|
|
|
+ <view class="exit-btn-box">
|
|
|
+ <view class="not-confirm-btn" @click="handleClose"></view>
|
|
|
+ <view class="confirm-btn" @click="confirmBtn"></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+ import { ref } from 'vue';
|
|
|
+ const exitPopup = ref(null); // 索引
|
|
|
+ const $emit = defineEmits(['confirm-btn'])
|
|
|
+ // 打开弹窗
|
|
|
+ function handleShow() {
|
|
|
+ exitPopup.value.open();
|
|
|
+ }
|
|
|
+ // 取消
|
|
|
+ function handleClose() {
|
|
|
+ exitPopup.value.close();
|
|
|
+ }
|
|
|
+ // 确认
|
|
|
+ function confirmBtn(){
|
|
|
+ $emit('confirm-btn');
|
|
|
+ exitPopup.value.close();
|
|
|
+ }
|
|
|
+ defineExpose({
|
|
|
+ handleShow
|
|
|
+ })
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+</style>
|