| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!-- 小弹窗 一行文字 -->
- <template>
- <uni-popup ref="tipSmallPopup" :animation="false" :is-mask-click="false"
- mask-background-color="rgba(0,0,0, 0.76);">
- <view class="ezy-tip-dialog tip-small-dialog">
- <view class="tip-content-box">
- <view class="tip-title">{{title}}</view>
- <view class="tip-content">{{content}}</view>
- <view class="tip-btn-box">
- <ezyActiveVue class="ezy-btn-active not-confirm-btn" @aclick="handleClose">取消</ezyActiveVue>
- <ezyActiveVue class="ezy-btn-active confirm-btn" @aclick="confirmBtn">确认</ezyActiveVue>
- </view>
- </view>
- </view>
- </uni-popup>
- </template>
- <script setup>
- import { ref } from 'vue';
- import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
- const props = defineProps({
- title: {
- type: String,
- default: '提示'
- },
- content: {
- type: String,
- require: true,
- default: ''
- },
- });
- const tipSmallPopup = ref(null); // 索引
- const $emit = defineEmits(['confirm-btn'])
- // 打开弹窗
- function handleShow() {
- tipSmallPopup.value.open();
- }
- // 取消
- function handleClose() {
- tipSmallPopup.value.close();
- }
- // 确认
- function confirmBtn(){
- $emit('confirm-btn');
- tipSmallPopup.value.close();
- }
- defineExpose({
- handleShow,handleClose
- })
- </script>
- <style>
- </style>
|