Skip to content

Commit

Permalink
BasicTable tableTop 插槽位置修正
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Nov 28, 2024
1 parent 21250c4 commit eaf5502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/components/Table/src/BasicTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<template #headerTop v-if="$slots.headerTop">
<slot name="headerTop"></slot>
</template>
<template #tableTop v-if="$slots.tableTop">
<slot name="tableTop"></slot>
</template>
</TableHeader>
<BasicForm
ref="formRef"
Expand All @@ -41,6 +38,7 @@
<slot :name="item" v-bind="data || {}"></slot>
</template>
</BasicForm>
<slot v-if="$slots.tableTop" name="tableTop"></slot>
<div v-if="showSelectionBar" class="m-3 mt-0">
<TableSelectionBar
:clearSelectedRowKeys="getHeaderProps.clearSelectedRowKeys!"
Expand Down Expand Up @@ -297,12 +295,7 @@
const { title, showTableSetting, titleHelpMessage, tableSetting, showSelectionBar } =
unref(getProps);
const hideTitle =
!title &&
!slots.tableTitle &&
!slots.toolbar &&
!slots.headerTop &&
!slots.tableTop &&
!showTableSetting;
!title && !slots.tableTitle && !slots.toolbar && !slots.headerTop && !showTableSetting;
if (hideTitle && !isString(title)) {
return { class: 'hidden' };
}
Expand Down
1 change: 0 additions & 1 deletion src/components/Table/src/components/TableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<div v-if="showSelectionBar" class="m-1 mt-2">
<TableSelectionBar :clearSelectedRowKeys="props.clearSelectedRowKeys!" :count="props.count" />
</div>
<slot name="tableTop"></slot>
</div>
</template>
<script lang="ts">
Expand Down

0 comments on commit eaf5502

Please sign in to comment.