Skip to content

Commit

Permalink
fix: 控制 tab 是否可以刷新
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Nov 14, 2024
1 parent 8530183 commit 2f1b8b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference/plugin/plugins/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export const layout = {
- **类型**`boolean`
- **默认值**`false`

- **详情**:是否开启多页。
- **详情**:是否开启多页。可通过 tabReload: false 控制标签页是否重新加载。

### menus

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<FTabPane v-for="page in pageList" :key="page.path" :value="page.path" :closable="pageList.length > 1">
<template #tab>
{{ page.title }}
<ReloadOutlined v-show="route.path === page.path" class="layout-tabs-close-icon" @click="reloadPage(page.path)" />
<ReloadOutlined v-if="page.tabReload" v-show="route.path === page.path" class="layout-tabs-close-icon" @click="reloadPage(page.path)" />
</template>
</FTabPane>
<template #suffix>
Expand Down Expand Up @@ -73,6 +73,7 @@ export default {
name: _route.meta.name ?? _route.name,
title: computedTitle,
key: getKey(),
tabReload: _route.meta.tabReload ?? true,
};
};
Expand Down

0 comments on commit 2f1b8b4

Please sign in to comment.