Solve the problem that when using element-ui + vue, embedding tabs in the dialog and closing the dialog again will cause the browser to freeze.

This bug needs to be fixed by element-ui officials, so this solution is temporarily used to temporarily solve this problem.

  <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
            <el-row>
              <el-col :span="24">
                <el-tabs v-model="activeName" @tab-click="handleClick">
                  <el-tab-pane label="用户管理" name="first"></el-tab-pane>
                  <el-tab-pane label="配置管理" name="second"></el-tab-pane>
                  <el-tab-pane label="角色管理" name="third"></el-tab-pane>
                  <el-tab-pane label="定时任务补偿" name="fourth"></el-tab-pane>
                </el-tabs>
              </el-col>
            </el-row>
            <el-row v-if="activeName === 'first'">用户管理</el-row>
            <el-row v-if="activeName === 'second'">配置管理</el-row>
            <el-row v-if="activeName === 'third'">角色管理</el-row>
            <el-row v-if="activeName === 'fourth'">定时任务补偿</el-row>
</el-dialog>

Guess you like

Origin blog.csdn.net/qq_48294048/article/details/124714682