feat:所有模块,接入 access 权限控制
This commit is contained in:
@@ -5,6 +5,9 @@ import type { SystemSmsLogApi } from '#/api/system/sms/log';
|
||||
import { getSimpleSmsChannelList } from '#/api/system/sms/channel';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
||||
import { useAccess } from '@vben/access';
|
||||
|
||||
const { hasAccessByCodes } = useAccess();
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
@@ -176,6 +179,7 @@ export function useGridColumns<T = SystemSmsLogApi.SystemSmsLog>(
|
||||
{
|
||||
code: 'view',
|
||||
text: '查看',
|
||||
show: hasAccessByCodes(['system:sms-log:query']),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -83,7 +83,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
<DetailModal @success="onRefresh" />
|
||||
<Grid table-title="短信日志列表">
|
||||
<template #toolbar-tools>
|
||||
<Button type="primary" class="ml-2" @click="onExport">
|
||||
<Button type="primary" class="ml-2" @click="onExport" v-access:code="['system:sms-log:export']">
|
||||
<Download class="size-5" />
|
||||
{{ $t('ui.actionTitle.export') }}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user