refactor edit and edges
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<script>
|
||||
|
||||
export let schema;
|
||||
export let isCreateMode;
|
||||
export let active = "";
|
||||
|
||||
let tabs = schema.groups?.map((group) => {
|
||||
@@ -11,28 +9,12 @@
|
||||
label: "Main",
|
||||
name: "",
|
||||
};
|
||||
let graphTab = {
|
||||
label: "Graph",
|
||||
name: "_graph",
|
||||
};
|
||||
if (isCreateMode) {
|
||||
tabs = [mainTab, ...tabs];
|
||||
} else {
|
||||
tabs = [mainTab, ...tabs, graphTab];
|
||||
}
|
||||
|
||||
function showGraph(e) {
|
||||
e.preventDefault();
|
||||
active = "_graph";
|
||||
}
|
||||
tabs = [mainTab, ...tabs];
|
||||
|
||||
function changeTab(e, tabName) {
|
||||
e.preventDefault();
|
||||
if (tabName == "_graph") {
|
||||
showGraph(e);
|
||||
} else {
|
||||
active = tabName;
|
||||
}
|
||||
active = tabName;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user