如何解决el-table多表格弹窗嵌套显示数据错乱问题?

摘要:1、业务背景 使用vue+element开发报表功能时,需要列表上某列的超链接按钮弹窗展示,在弹窗的el-table列表某列中再次使用超链接按钮点开弹窗,以此类推多表格弹窗嵌套,本文以弹窗两次为例 最终效果如下示例页面 2
1、业务背景 使用vue+element开发报表功能时,需要列表上某列的超链接按钮弹窗展示,在弹窗的el-table列表某列中再次使用超链接按钮点开弹窗,以此类推多表格弹窗嵌套,本文以弹窗两次为例 最终效果如下示例页面 2、具体实现和问题抛出 <template> <div class="el_main"> <el-table stripe style="width: 100%" v-loading="loading" row-key="Id" :data="list" > <el-table-column label="ID" prop="Id" min-width="3"> </el-table-column> <el-table-column label="类型" prop="Type" min-width="5"> <template slot-scope="scope"> {{ formatTaskType(scope.row.Type) }} </template> </el-table-column> <el-table-column label="详情" prop="TaskTitle" min-width="10" show-overflow-tooltip="true"></el-table-column> <el-table-column label="详情弹窗" min-width="3"> <template slot-scope="scope"> <el-button @click="handleClick(scope.row)" type="text">查看</el-button> </template> </el-table-column> <el-table-column label="创建时间" prop="AddTime" min-width="5"> <template slot-scope="scope" v-if="scope.row.AddTime"> {{ (scope.row.AddTime * 1000) | formatDate(2) }} </template> </el-table-column> </el-table> </div> <!-- 详情弹窗 --> <el-dialog title="详情弹窗" :visible.sync="detailInfoDialogVisible" append-to-body width="50%"> <el-table stripe style="width: 100%" v-loading="loading" row-key="Id" height="300" max-height="650" :data="detailInfo"> <el-table-column label="ID" prop="TaskId" min-width="80"></el-table-column> <el-table-column label="名称" prop="TaskName" min-width="65"></el-table-column> <el-table-column label="成功数量" prop="SuccessNum" min-width="22"></el-t
阅读全文