|
@@ -16,7 +16,7 @@
|
|
|
<div slot="footer">
|
|
|
<slot name="footer">
|
|
|
<el-button @click="handleCancel" size="small">取消</el-button>
|
|
|
- <el-button @click="handleConfirm" type="primary" size="small" :disabled="this.btnDisabled"
|
|
|
+ <el-button @click="handleConfirm" type="primary" size="small" :disabled="this.BtnDisabled"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</slot>
|
|
@@ -27,6 +27,10 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
props: {
|
|
|
+ btnDisabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
visible: {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
@@ -58,17 +62,22 @@ export default {
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
- btnDisabled: false,
|
|
|
+ BtnDisabled: false,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ btnDisabled(val){
|
|
|
+ this.BtnDisabled =val
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 确定的回调
|
|
|
handleConfirm() {
|
|
|
- this.btnDisabled = false;
|
|
|
+ this.BtnDisabled = false;
|
|
|
this.$emit("confirm", false);
|
|
|
- this.btnDisabled = true;
|
|
|
+ // this.BtnDisabled = this.btnDisabled;
|
|
|
},
|
|
|
// 取消的回调
|
|
|
handleCancel() {
|