<template>
	<view>
		<view class="global-mask" v-show="isShowDialog"></view>
		<view class="global-dialog" v-show="isShowDialog">
			<view class="title">{{showTitle}}</view>
			<view class="content">
				<view class="text">{{showText}}</view>
			</view>
			<view class="btn">
				<view class="left" @tap="cancel" v-if="isShowCancel">{{cancelText}}</view>
				<view class="right" @tap="confirm" v-if="isShowConfirm">{{confirmText}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'modalDialog',
		props: {
			showTitle: {
				type: String,
				default: '温馨提示'
			},
			showText: {
				type: String,
				default: '提示内容'
			},
			isShowDialog: {
				type: Boolean,
				default: false
			},
			isShowCancel: {
				type: Boolean,
				default: true
			},
			cancelText: {
				type: String,
				default: '取消'
			},
			isShowConfirm: {
				type: Boolean,
				default: true
			},
			confirmText: {
				type: String,
				default: '确定'
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			cancel() {
				this.$emit('cancel');
			},
			
			confirm() {
				this.$emit('confirm');
			}
		}
	}
</script>

<style lang="scss">

</style>
