update fileTable的刷新按钮放在右上角
This commit is contained in:
@@ -23,10 +23,20 @@
|
||||
:id="row[fileIdField] || row.fileId || row.uuid"
|
||||
/>
|
||||
</template>
|
||||
<!-- baseTable插槽 -->
|
||||
<template v-for="(_, name) in $slots" #[name]="slotData">
|
||||
<!-- baseTable插槽 单独处理leftOptions-->
|
||||
<template
|
||||
v-for="(_, name) in $slots?.filter?.((v: any) => v.name !== 'leftOptions') ?? []"
|
||||
#[name]="slotData"
|
||||
:key="name"
|
||||
>
|
||||
<slot :name="name" v-bind="slotData"></slot>
|
||||
</template>
|
||||
<template #leftOptions>
|
||||
<div class="left-options-wrapper">
|
||||
<slot name="leftOptions"></slot>
|
||||
<el-button v-if="defaultActions?.includes('refresh')" @click="refreshFun">刷新</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</BaseTable>
|
||||
<FilePreview v-model="previewVisible" :fileId="previewFileId" />
|
||||
<!-- 重命名 -->
|
||||
@@ -162,15 +172,15 @@ const defaultActionList = computed(() => [
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(props.defaultActions?.includes('refresh')
|
||||
? [
|
||||
{
|
||||
title: t('通用.刷新'),
|
||||
type: 'primary',
|
||||
click: () => refreshFun(),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
// ...(props.defaultActions?.includes('refresh')
|
||||
// ? [
|
||||
// {
|
||||
// title: t('通用.刷新'),
|
||||
// type: 'primary',
|
||||
// click: () => refreshFun(),
|
||||
// },
|
||||
// ]
|
||||
// : []),
|
||||
]);
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
@@ -348,6 +358,11 @@ defineExpose({
|
||||
.file-table {
|
||||
height: 100%;
|
||||
}
|
||||
.left-options-wrapper {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
.file-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user