框架代码同步后菜单调整

This commit is contained in:
fan 2023-07-21 16:03:55 +08:00
parent 26bdaa0e0a
commit 66ca2e9687
3 changed files with 36 additions and 20 deletions

View File

@ -127,10 +127,22 @@ const axleCountingSectionOptions: MenuItemOptions = {
const LogicSectionOptions: MenuItemOptions = {
name: '图层-逻辑区段',
};
// [
// {
// name: '图层菜单',
// items: [
// AllOptions,
// linkOptions,
// axleCountingSectionOptions,
// LogicSectionOptions,
// ],
// },
// ]
const layerOptions: MenuItemOptions = {
name: '图层',
subMenu: [
subMenu: {
name: '图层菜单',
groups: [
{
name: '图层菜单',
items: [
@ -141,6 +153,7 @@ const layerOptions: MenuItemOptions = {
],
},
],
},
};
export const DefaultCanvasMenu = new ContextMenu({

View File

@ -93,12 +93,15 @@ const linkOptions: MenuItemOptions = {
const layerOptions: MenuItemOptions = {
name: '图层',
subMenu: [
subMenu: {
name: '图层菜单',
groups: [
{
name: '图层菜单',
items: [PhysicsOptions, linkOptions],
},
],
},
};
const DefaultCanvasMenu = new ContextMenu({
name: '图层选择',

View File

@ -28,7 +28,7 @@
import { onMounted, ref, computed, onUnmounted, watch } from 'vue';
import { useLineStore } from 'src/stores/line-store';
import { useRoute, useRouter } from 'vue-router';
import { loadLineDatas, getLineApp, destroyLineApp } from 'src/drawApp/lineApp';
import { loadLineDatas, getLineApp } from 'src/drawApp/lineApp';
import { destroySimulation } from 'src/api/Simulation';
import TrainPage from 'src/pages/TrainPage.vue';
import { Train } from 'src/graphics/train/Train';
@ -86,7 +86,7 @@ onMounted(() => {
onUnmounted(() => {
if (simulationId) {
lineStore.setSimulationId(null);
destroyLineApp();
lineStore.destroy();
destroySimulation({ simulationId });
}
});