On the conditional rendering of vue

use element-ui to make two tables and use conditional rendering to control switching. It is found that the display is not normal using v-if, but v-show can display and switch normally. The structure of
table is as follows:

 <!--  -->
        <el-table   :data="tableDataHistory"
                    v-show="enabledBill"
                    v-loading="loading"
                    v-resize="{height:41}"
                    element-loading-text="..."
                    highlight-current-row
                    @selection-change=" handle_selection_change">
            <el-table-column type="selection">
            </el-table-column>
            <el-table-column prop="date" label="">
            </el-table-column>
            <el-table-column prop="date" label="">
            </el-table-column>
        </el-table>
        <!--  -->
        <el-table   :data="tableDataEnabled"
                    v-show="!enabledBill"
                    v-loading="loading"
                    v-resize="{height:41}"
                    element-loading-text="..."
                    highlight-current-row
                    @selection-change="handle_selection_change">
            <el-table-column type="selection">
            </el-table-column>
            <el-table-column prop="date" label="">
            </el-table-column>
            <el-table-column prop="date" label="">
            </el-table-column>
        </el-table>

using v-show, the table can be displayed and switched normally:

v-showv-if:

Why is this?

Jun.22,2022

add a unique key value to each v-if try


my display is normal https://jsfiddle.net/f7qu14ay/1/

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b312-4d911.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b312-4d911.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?