方式一
<a-button
type="primary"
v-auth="'demo.list.export'"
:loading="exportLoading"
>导出</a-button>
方式二
<TableAction
:actions="[
{
label: '详情',
onClick: detail.bind(null, record),
auth: 'demo.list.info',
},
]"
:dropDownActions="[
{
label: '编辑',
onClick: edit.bind(null, record),
auth: 'demo.list.edit',
ifShow: false,
},
]"
/>
代码片段
<template>
<div>
<BasicTable @register="registerTable">
<template #tableTitle>
<a-button
type="primary"
v-auth="'demo.list.export'"
:loading="exportLoading"
>导出</a-button
>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '详情',
onClick: detail.bind(null, record),
auth: 'demo.list.info',
},
]"
:dropDownActions="[
{
label: '编辑',
onClick: edit.bind(null, record),
auth: 'demo.list.edit',
ifShow: false,
},
]"
/>
</template>
</BasicTable>
</div>
</template>
因篇幅问题不能全部显示,请点此查看更多更全内容