el-dialog(点击左上角的关闭x)执行弹窗关闭之前的回调

绑定的事件:

:before-close="handleDialogClose"
html:
    <!-- 新增、编辑弹窗 -->
    <el-dialog
      :close-on-click-modal="false"
      :before-close="handleDialogClose"    // 绑定回调的方法
      v-dialogDrag
      :title="title"
      :visible.sync="editdataDialog"
      width="30%"
    >    

method:

    // 关闭之前的回调
    handleDialogClose() {
        this.searchBymName();
        this.editdataDialog = false;
    },
原文地址:https://www.cnblogs.com/flypig666/p/11976649.html