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