<el-dialog
class="assignWorkloadDialog"
title="工时指派"
:visible="workDetailDialogVisible"
width="40%"
:modal="false"
:before-close="resetWorkTime(done)"
>
</el-dialog>
export default {
data() {
return {
workDetailDialogVisible: false,
}
},
method: {
queryWorkTimeAssignmentInfo(iterationPlanId) {
this.workDetailDialogVisible = true;
},
resetWorkTime() {
this.zhipaiTotal = 0;
},
}
}
visible属性控制对话框的显示,默认为false,即不显示不弹出
当触发某个事件会调用queryWorkTimeAssignmentInfo方法并且workDetailDialogVisible值变为ture,弹出对话框
before-close属性是指关闭对话框之前要做的事,给方法里面传一个done参数,相当于把workDetailDialogVisible变为true
如果不传done,得手动在方法里面把workDetailDialogVisible变为true,不然关闭按钮会失效