12345678910111213141516171819202122232425262728293031323334 |
- <!-- 中弹窗 二行文字 -->
- <template>
- <uni-popup ref="dialogRef" :animation="false" :is-mask-click="false"
- mask-background-color="rgba(255, 255, 255, 0.6);">
- <slot></slot>
- </uni-popup>
- </template>
- <script setup>
- import { ref } from 'vue';
- const props = defineProps({
- title: {
- type: String,
- default: '提示'
- },
- });
- const dialogRef = ref(null); // 索引
- // 打开弹窗
- function handleShow() {
- dialogRef.value.open();
- }
- // 取消
- function handleClose() {
- dialogRef.value.close();
- }
- defineExpose({
- handleShow,
- handleClose
- })
- </script>
- <style>
- </style>
|