mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
@ -12,7 +12,7 @@
|
||||
@after-enter="handleAfterEnter"
|
||||
>
|
||||
<keep-alive :include="routeStore.cacheRoutes">
|
||||
<component :is="Component" v-if="app.reloadFlag" :key="route.path" />
|
||||
<component :is="Component" v-if="app.reloadFlag" :key="route.fullPath" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
|
@ -69,7 +69,7 @@ const options = computed<Option[]>(() => [
|
||||
{
|
||||
label: '关闭',
|
||||
key: 'close-current',
|
||||
disabled: props.currentPath === tab.homeTab.path,
|
||||
disabled: props.currentPath === tab.homeTab.fullPath,
|
||||
icon: iconifyRender('ant-design:close-outlined')
|
||||
},
|
||||
{
|
||||
|
@ -3,15 +3,15 @@
|
||||
<component
|
||||
:is="activeComponent"
|
||||
v-for="(item, index) in tab.tabs"
|
||||
:key="item.path"
|
||||
:is-active="tab.activeTab === item.path"
|
||||
:key="item.fullPath"
|
||||
:is-active="tab.activeTab === item.fullPath"
|
||||
:primary-color="theme.themeColor"
|
||||
:closable="item.path !== tab.homeTab.path"
|
||||
:closable="item.name !== tab.homeTab.name"
|
||||
:dark-mode="theme.darkMode"
|
||||
:class="{ '!mr-0': isChromeMode && index === tab.tabs.length - 1, 'mr-10px': !isChromeMode }"
|
||||
@click="tab.handleClickTab(item.path)"
|
||||
@close="tab.removeTab(item.path)"
|
||||
@contextmenu="handleContextMenu($event, item.path)"
|
||||
@click="tab.handleClickTab(item.fullPath)"
|
||||
@close="tab.removeTab(item.fullPath)"
|
||||
@contextmenu="handleContextMenu($event, item.fullPath)"
|
||||
>
|
||||
<Icon v-if="item.meta.icon" :icon="item.meta.icon" class="inline-block align-text-bottom mr-4px text-16px" />
|
||||
{{ item.meta.title }}
|
||||
@ -77,11 +77,11 @@ function setDropdown(x: number, y: number, currentPath: string) {
|
||||
}
|
||||
|
||||
/** 点击右键菜单 */
|
||||
async function handleContextMenu(e: MouseEvent, path: string) {
|
||||
async function handleContextMenu(e: MouseEvent, fullPath: string) {
|
||||
e.preventDefault();
|
||||
const { clientX, clientY } = e;
|
||||
hideDropdown();
|
||||
setDropdown(clientX, clientY, path);
|
||||
setDropdown(clientX, clientY, fullPath);
|
||||
await nextTick();
|
||||
showDropdown();
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ function init() {
|
||||
}
|
||||
|
||||
watch(
|
||||
() => route.path,
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
tab.addTab(route);
|
||||
tab.setActiveTab(route.path);
|
||||
tab.setActiveTab(route.fullPath);
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user