简约版消息确认提示弹窗,开启 message 属性则使用统一的消息提示类型。
依赖组件:uni-popup
适用于消息提示的弹框
props
属性 |
类型 |
说明 |
默认 |
modelValue |
boolean |
弹框显示与隐藏 |
false |
title |
string |
弹框标题 |
提示 |
message |
boolean |
内置消息文案样式 |
false |
hideCancel |
boolean |
隐藏取消按钮 |
false |
confirmText |
string |
确认按钮文案 |
确认 |
cancelText |
string |
取消按钮文案 |
取消 |
emits
事件名 |
说明 |
confirm |
确认事件 |
cancel |
取消事件 |
slots
插槽名 |
说明 |
default |
内容区插槽 |
footer |
底部插槽 |
title |
头部插槽 |
示例代码
<template>
<mosowe-button @click="popupNoCancelShow = true">无取消弹框</mosowe-button>
<mosowe-confirm-popup
v-model="popupNoCancelShow"
hideCancel
confirmText="我知道了">
没有取消弹框
</mosowe-confirm-popup>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const popupSlotFooterShow = ref(false);
</script>