合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

1 week ago
  1. 简约版消息确认提示弹窗,开启 message 属性则使用统一的消息提示类型。
  2. 依赖组件:uni-popup
  3. 适用于消息提示的弹框
  4. ## props
  5. | 属性 | 类型 | 说明 | 默认 |
  6. | :---------- | :-----: | :--------------- | :---: |
  7. | modelValue | boolean | 弹框显示与隐藏 | false |
  8. | title | string | 弹框标题 | 提示 |
  9. | message | boolean | 内置消息文案样式 | false |
  10. | hideCancel | boolean | 隐藏取消按钮 | false |
  11. | confirmText | string | 确认按钮文案 | 确认 |
  12. | cancelText | string | 取消按钮文案 | 取消 |
  13. ## emits
  14. | 事件名 | 说明 |
  15. | :------ | :------: |
  16. | confirm | 确认事件 |
  17. | cancel | 取消事件 |
  18. ## slots
  19. | 插槽名 | 说明 |
  20. | ------- | ---------- |
  21. | default | 内容区插槽 |
  22. | footer | 底部插槽 |
  23. | title | 头部插槽 |
  24. ## 示例代码
  25. ```vue
  26. <template>
  27. <mosowe-button @click="popupNoCancelShow = true">无取消弹框</mosowe-button>
  28.     
  29. <mosowe-confirm-popup
  30. v-model="popupNoCancelShow"
  31. hideCancel
  32. confirmText="我知道了">
  33. 没有取消弹框
  34. </mosowe-confirm-popup>
  35. </template>
  36. <script setup lang="ts">
  37. import { ref } from 'vue';
  38. const popupSlotFooterShow = ref(false);
  39. </script>
  40. ```