Skip to content

More 更多操作

💡 组件名:my-dropdown-more

更多操作组件,通常用于表格行多个操作合并为一个操作

局部导入

ts
import { defineAsyncComponent } from 'vue'
ts
const MyDropdownMore = defineAsyncComponent(() => import('/@/components/my-dropdown-more/index.vue'))

基本使用

vue
<my-dropdown-more v-auths="['api:module:update', 'api:module:delete']">
  <template #dropdown>
    <el-dropdown-menu>
      <el-dropdown-item v-if="auth('api:module:update')" @click="onEdit(row)">编辑</el-dropdown-item>
      <el-dropdown-item v-if="auth('api:module:delete')" @click="onDelete(row)">删除</el-dropdown-item>
    </el-dropdown-menu>
  </template>
</my-dropdown-more>

Props

参数说明类型默认值可选值
iconOnly只显示图标Booleanfalse-
icon图标提示StringiconOnly ? 'ele-MoreFilled' : 'ele-ArrowDown'-
buttonText文本提示StringiconOnly ? '' : ' 更多'-