<el-dialog
:visible.sync="dialogVisible"
@open="isDisabled= false">
......
......
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button :disabled="isDisabled" @click="doIt">确 定</el-button>
</span>
</el-dialog>
data() {
return {
isDisabled: false,
},
methods:{
doIt() {
this.isDisabled= true;
this.putRequest("/rear/assets/addAsset", this.assets).then(resp => {
if (resp) {
this.dialogVisible = false;
this.initData();
} else {
this.isDisabled= false;
}
})
},
}