Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
Vue-Dashboard
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高源
Vue-Dashboard
Commits
2190a231
Commit
2190a231
authored
Apr 25, 2025
by
User
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签页关闭、显示异常问题解决
parent
2deba187
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
index.html
dist/index.html
+2
-2
[url].vue
src/views/_builtin/iframe-page/[url].vue
+9
-3
No files found.
dist/index.html
View file @
2190a231
<!doctype html>
<html
lang=
"zh-cmn-Hans"
>
<head>
<meta
name=
"buildTime"
content=
"2025-04-25 1
4:26:56
"
>
<meta
name=
"buildTime"
content=
"2025-04-25 1
5:49:09
"
>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
href=
"/favicon.svg"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"color-scheme"
content=
"light dark"
/>
<title>
VueDashboard
</title>
<script
type=
"module"
crossorigin
src=
"/Content/VueDashboardUi/VueDashboard1/assets/index-
BNcrQaoq
.js"
></script>
<script
type=
"module"
crossorigin
src=
"/Content/VueDashboardUi/VueDashboard1/assets/index-
CrvCiZyA
.js"
></script>
<link
rel=
"stylesheet"
crossorigin
href=
"/Content/VueDashboardUi/VueDashboard1/assets/index-DhhgO4aJ.css"
>
</head>
<body>
...
...
src/views/_builtin/iframe-page/[url].vue
View file @
2190a231
...
...
@@ -6,6 +6,7 @@ import { useEventBus } from '@vueuse/core'; // 添加事件总线
import
{
loadModule
}
from
'vue3-sfc-loader'
;
import
{
getSelectMenu
}
from
'@/service/api'
;
import
NotFound
from
'@/views/_builtin/404/index.vue'
;
// 引入 404 组件
import
{
useTabStore
}
from
'@/store/modules/tab'
;
import
ExtJsComponent
from
'./extJs.vue'
;
import
WebviewComponent
from
'./webview.vue'
;
import
VueComponent
from
'./vueComponent.vue'
;
// 添加新组件导入
...
...
@@ -31,7 +32,9 @@ const extJsRef = ref<any>(null);
const
vueComponentRef
=
ref
<
any
>
(
null
);
// 监听标签关闭事件
const
tabCloseEventBus
=
useEventBus
(
'tab-close'
);
const
tabCloseEventBus
=
useEventBus
<
string
>
(
'tab-close'
);
const
tabStore
=
useTabStore
();
// 清理所有资源的函数
const
cleanupResources
=
()
=>
{
...
...
@@ -60,8 +63,11 @@ const cleanupResources = () => {
};
// 监听标签关闭事件
tabCloseEventBus
.
on
(()
=>
{
cleanupResources
();
tabCloseEventBus
.
on
(
closedTabId
=>
{
// 只有当关闭的是当前标签时才清理资源
if
(
closedTabId
===
tabStore
.
activeTabId
)
{
cleanupResources
();
}
});
// 组件卸载前清理
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment