This commit is contained in:
Qiuxia Fan 2022-06-14 16:20:40 +08:00
parent 4a7f8df5ef
commit d52df32f8c
2 changed files with 12 additions and 1 deletions

View File

@ -168,6 +168,11 @@ export default defineComponent({
dashboardStore.layout[l].children[activeTabIndex.value].children dashboardStore.layout[l].children[activeTabIndex.value].children
); );
needQuery.value = true; needQuery.value = true;
if (route.params.activeTabIndex) {
let p = location.href.split("/tab/")[0];
p = p + "/tab/" + activeTabIndex.value;
history.replaceState({}, "", p);
}
} }
function removeTab(e: Event) { function removeTab(e: Event) {
e.stopPropagation(); e.stopPropagation();
@ -217,9 +222,12 @@ export default defineComponent({
); );
} }
function copyLink() { function copyLink() {
let path = location.href; let path = "";
if (route.params.activeTabIndex === undefined) { if (route.params.activeTabIndex === undefined) {
path = location.href + "/tab/" + activeTabIndex.value; path = location.href + "/tab/" + activeTabIndex.value;
} else {
const p = location.href.split("/tab/")[0];
path = p + "/tab/" + activeTabIndex.value;
} }
copy(path); copy(path);
} }

View File

@ -538,6 +538,9 @@ function setNodeTools(nodeDashboard: any) {
} }
} }
async function freshNodes() { async function freshNodes() {
if (!svg.value) {
return;
}
svg.value.selectAll(".topo-svg-graph").remove(); svg.value.selectAll(".topo-svg-graph").remove();
await init(); await init();
update(); update();