12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <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>
|