chore: oss
This commit is contained in:
parent
cc9f1684f6
commit
1947f5c3b6
@ -27,6 +27,9 @@ import { downloadByData } from '#/utils/file/download';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 80,
|
||||
},
|
||||
schema: querySchema(),
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||
};
|
||||
@ -78,6 +81,7 @@ const gridOptions: VxeGridProps = {
|
||||
rowConfig: {
|
||||
isHover: true,
|
||||
keyField: 'ossId',
|
||||
height: 65,
|
||||
},
|
||||
sortConfig: {
|
||||
remote: true,
|
||||
@ -87,6 +91,7 @@ const gridOptions: VxeGridProps = {
|
||||
showOverflow: true,
|
||||
};
|
||||
|
||||
const checked = ref(false);
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
gridOptions,
|
||||
@ -94,6 +99,12 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
sortChange: () => {
|
||||
tableApi.query();
|
||||
},
|
||||
checkboxChange: (e: any) => {
|
||||
checked.value = e.records.length > 0;
|
||||
},
|
||||
checkboxAll: (e: any) => {
|
||||
checked.value = e.records.length > 0;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -161,9 +172,10 @@ function isImageFile(ext: string) {
|
||||
配置管理
|
||||
</a-button>
|
||||
<a-button
|
||||
:disabled="!checked"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['system:oss:delete']"
|
||||
v-access:code="['system:oss:remove']"
|
||||
@click="handleMultiDelete"
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
@ -180,31 +192,29 @@ function isImageFile(ext: string) {
|
||||
<span v-else>{{ row.url }}</span>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<a-button
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:oss:edit']"
|
||||
@click="handleDownload(row)"
|
||||
>
|
||||
{{ $t('pages.common.download') }}
|
||||
</a-button>
|
||||
<Popconfirm
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<a-button
|
||||
danger
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:oss:edit']"
|
||||
@click="handleDownload(row)"
|
||||
v-access:code="['system:oss:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.download') }}
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<Popconfirm
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<a-button
|
||||
danger
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:oss:delete']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</Popconfirm>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</Page>
|
||||
|
Loading…
Reference in New Issue
Block a user