Skip to content

当v-permission用在el-table-column上的时候 #1418

@weituotian

Description

@weituotian

是这样的,用户有权限才显示表格的这一列,所以在el-table-column用v-permission,
但是没有权限的时候还是会显示这一列,我用在el-button上按钮是隐藏的。
这个v-permission不兼容表格吗?el-table-column又自动把它加上了?
image

      <el-table-column v-permission="['booksRelease']" label="审核操作" align="center" width="240" class-name="">
        <template slot-scope="scope">
          <el-button-group>
            <el-tooltip v-permission="['booksRelease']" class="item" effect="dark" content="对图书发布状态进行设置" placement="top">
              <el-button :loading="requesting" type="primary" size="small" round @click="release(scope.row)">
                {{ scope.row.release===1?'取消发布':'发布' }}
              </el-button>
            </el-tooltip>
            <el-tooltip v-permission="['booksRelease']" class="item" effect="dark" content="对图书审核状态进行设置" placement="top">
              <el-button :loading="requesting" type="primary" size="small" round @click="openReview(scope.row)">
                审核
              </el-button>
            </el-tooltip>
          </el-button-group>
        </template>
      </el-table-column>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions