el-dialog销毁

问题描述

使用<el-dialog>弹出框时,数据不会根据点击不同而实时更新,一直都会是第一次点击显示弹出框时的数据,这时就需要在弹出框关闭时销毁。

v-if 控制

    <el-dialog
      title="修改信息"
      :visible.sync="updateTableVisible"
      center
      v-if="updateTableVisible"
      :lock-scroll="false"
      width="1000px"
    >
      <span slot="footer" class="dialog-footer">
        <el-button @click="cancelUpdate" class="doNothing">取 消</el-button>
        <el-button type="primary" @click="doUpdate" class="doButton">确 定</el-button>
      </span>

      <innerStaffUpdate :transferValue="updatePartOldValue" />
      
    </el-dialog>
发布了23 篇原创文章 · 获赞 0 · 访问量 944

猜你喜欢

转载自blog.csdn.net/finally_flx/article/details/104001347