<template>
    <view v-if="showdialog">
		<van-dialog  
		:title="titles"
		show-cancel-button="true"
		:show="showdialog"
		@cancel="cancelDialog" @confirm="confirmOrder"
		>
		<view>
			{{values}}
		</view>
		</van-dialog>
	</view>
</template>

<script>
  export default {
    props:{
      orderCancel:{
        default: false,
        type: Boolean
      },
	  titles: {
		  default: '确定取消订单？',
		  type: String
	  },
	  values:{
		  default: '',
		  type: String
	  },
    },
    data() {
      return {
        showdialog: false
      }
    },
	watch:{
		'orderCancel':function(val) {
			if(val) {
				this.showdialog = true;
			}else {
				this.showdialog = false;
			}
		}
	},
	onLoad() {
		console.log(this.titles)
	},
    methods: {
      cancelDialog() {
        this.show = false;
        this.$emit('colseDialog')
      },
      confirmOrder() {
        this.show = false;
        this.$emit('confirmPay')
      },
    }
  }
</script>

<style>
	  
  .showdialog {
	  width: 100%;
	  height: 100vh;
  }
</style>
