element ui中el-tabs标签点击切换闪屏问题

页面代码为

<el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="门店数据" name="first">
        <el-table ref="multipleTable" :stripe="true" :data="tableData" tooltip-effect="dark" border v-if="activeName==='first'"
           style="width: 100%" v-loading="loading" element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
          <el-table-column prop="shop_name" label="门店" align="center">
        el-table>
      el-tab-pane>
      <el-tab-pane label="品牌数据" name="second">
        <el-table ref="multipleTable" :stripe="true" :data="tableData" tooltip-effect="dark" border
          v-if="activeName==='second'" style="width: 100%" v-loading="loading" element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
          <el-table-column prop="领取" label="领取" align="center">
          el-table-column>
        el-table>
      el-tab-pane>
    el-tabs>

在table中添加v-if="activeName==='first'"
来源

你可能感兴趣的:(element,elementui,vue.js,前端)