feat(form): form-dialog重新打开是form重新渲染

This commit is contained in:
roymondchen 2022-09-23 19:56:10 +08:00 committed by jia000
parent 1c3565035c
commit 6cf1f8636c

View File

@ -1,16 +1,20 @@
<template> <template>
<teleport to="body">
<div class="m-form-dialog" v-show="dialogVisible">
<el-dialog <el-dialog
v-model="dialogVisible" v-model="dialogVisible"
class="m-form-dialog"
top="20px" top="20px"
append-to-body
:title="title" :title="title"
:width="width" :width="width"
:fullscreen="fullscreen" :fullscreen="fullscreen"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closeHandler" @close="closeHandler"
> >
<div class="m-dialog-body" :style="`max-height: ${bodyHeight}; overflow-y: auto; overflow-x: hidden;`"> <div
v-if="dialogVisible"
class="m-dialog-body"
:style="`max-height: ${bodyHeight}; overflow-y: auto; overflow-x: hidden;`"
>
<m-form <m-form
v-model="stepActive" v-model="stepActive"
ref="form" ref="form"
@ -46,8 +50,6 @@
</el-row> </el-row>
</template> </template>
</el-dialog> </el-dialog>
</div>
</teleport>
</template> </template>
<script lang="ts"> <script lang="ts">