1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!-- 中弹窗 二行文字 -->
- <template>
- <uni-popup ref="tipMiddlePopup" :animation="false" :is-mask-click="false"
- mask-background-color="rgba(255, 255, 255, 0.6);">
- <view class="ezy-tip-dialog tip-middle-dialog">
- <view class="tip-content-box">
- <view class="tip-title">{{title}}</view>
- <view class="tip-content">{{content}}</view>
- <view class="tip-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 props = defineProps({
- title: {
- type: String,
- default: '提示'
- },
- content: {
- type: String,
- require: true,
- default: ''
- },
- });
- const tipMiddlePopup = ref(null); // 索引
- const $emit = defineEmits(['confirm-btn'])
- // 打开弹窗
- function handleShow() {
- tipMiddlePopup.value.open();
- }
- // 取消
- function handleClose() {
- tipMiddlePopup.value.close();
- }
- // 确认
- function confirmBtn(){
- $emit('confirm-btn');
- tipMiddlePopup.value.close();
- }
- defineExpose({
- handleShow,
- handleClose
- })
- </script>
- <style>
- </style>
|