You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<!--
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-04-19 16:19:32
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-04-19 17:54:49
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<u-modal :show="show" :content="content" showCancelButton
|
|
|
|
:cancelText="cancelText" :confirmText="confirmText"
|
|
|
|
@confirm="myConfirm" @cancel="myCancel"/>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props : {
|
|
|
|
content : {
|
|
|
|
type : String,
|
|
|
|
default : ''
|
|
|
|
},
|
|
|
|
confirmText : {
|
|
|
|
type : String,
|
|
|
|
default : '确认'
|
|
|
|
},
|
|
|
|
confirm : {
|
|
|
|
type : Function,
|
|
|
|
default: function(){}
|
|
|
|
},
|
|
|
|
cancelText : {
|
|
|
|
type : String,
|
|
|
|
default : '取消'
|
|
|
|
},
|
|
|
|
cancel : {
|
|
|
|
type : Function,
|
|
|
|
default : function(){}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
show : true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods : {
|
|
|
|
async myConfirm(){
|
|
|
|
this.show = false;
|
|
|
|
await this.confirm();
|
|
|
|
document.body.removeChild(this.$el);
|
|
|
|
|
|
|
|
},
|
|
|
|
async myCancel(){
|
|
|
|
this.show = false;
|
|
|
|
await this.cancel();
|
|
|
|
document.body.removeChild(this.$el);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|