Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义指令v-auth当作用在el-dropdown-item上时失效 #378

Open
PathfinderAx opened this issue Dec 29, 2023 · 0 comments
Open

自定义指令v-auth当作用在el-dropdown-item上时失效 #378

PathfinderAx opened this issue Dec 29, 2023 · 0 comments

Comments

@PathfinderAx
Copy link

image

  <template #tableHeader>
    <el-button v-auth="'add'" type="primary" @click="openAmdDialog('新增')">新增</el-button>
    <el-dropdown>
      <el-button type="primary">
        导出<el-icon class="el-icon--right"><arrow-down /></el-icon>
      </el-button>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item v-auth="'exportTxt'">导出为TXT</el-dropdown-item>
          <el-dropdown-item v-auth="'exportExcel'">导出为Excel</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </template>

如图,在上方代码中使用el-dropdown组件时,当自定义指令v-auth当作用在el-dropdown-item上时失效,还是会全部展示,且控制台会报出警告

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant