<template>
	<dialog-base ref="baseDialog" title="提示">
		<view class="msg uni-row">{{message}}</view>
		<view class="btn-container uni-row">
			<button type="primary" class="btn" @click="handleConfirm">确认</button>
			<button type="primary" class="btn" @click="handleCancel">取消</button>
		</view>
	</dialog-base>
</template>

<script setup>
	import {
		ref,
		getCurrentInstance
	} from 'vue'
	import {
		saveUserequipment
	} from '@/api/business/userEquipment/userEquipment.js'
	import {
		defineProps
	} from 'vue'
	const baseDialog = ref(null)
	const message = ref('')
	const reqParam = ref({})
	const emit = defineEmits(['submit'])

	function open(msg) {
		message.value = msg;
		baseDialog.value.open();
	}

	function handleConfirm() {
		emit('submit');
		close();
	}

	function handleCancel() {
		close();
	}

	function close() {
		baseDialog.value.close()
	}

	defineExpose({
		open
	})
</script>

<style lang="scss">
	.dialog-body {
		.msg {
			height: 300rpx;
			justify-content: center;
			align-items: center;
		}

		.btn-container {
			margin-top: 32rpx;

			.btn {
				flex: 1;
				margin: 0 10rpx;
			}
		}
	}
</style>