+
import('layouts/DrawLayout.vue'),
},
+ {
+ path: '/linemap/:id',
+ name: 'linemap',
+ component: () => import('layouts/LineLayout.vue'),
+ },
// Always leave this as last one,
// but you can also remove it
diff --git a/src/stores/line-store.ts b/src/stores/line-store.ts
index 383611a..7d88c94 100644
--- a/src/stores/line-store.ts
+++ b/src/stores/line-store.ts
@@ -1,11 +1,5 @@
import { defineStore } from 'pinia';
-import {
- DrawAssistant,
- JlCanvas,
- JlDrawApp,
- JlGraphic,
- GraphicApp,
-} from 'src/jl-graphic';
+import { JlCanvas, JlGraphic, GraphicApp } from 'src/jl-graphic';
import { initLineApp, getLineApp, destroyLineApp } from 'src/drawApp/lineApp';
export const useLineStore = defineStore('line', {
@@ -33,7 +27,7 @@ export const useLineStore = defineStore('line', {
getJlCanvas(): JlCanvas {
return this.getLineApp().canvas;
},
- initDrawApp(dom: HTMLElement) {
+ initLineApp(dom: HTMLElement) {
const app = initLineApp(dom);
app.on('graphicselectedchange', () => {
this.selectedGraphics = app.selectedGraphics;
@@ -42,11 +36,10 @@ export const useLineStore = defineStore('line', {
return app;
},
destroy() {
- // console.log('绘制状态清空,绘制应用销毁');
this.selectedGraphics = null;
destroyLineApp();
},
- setDraftId(id: number | null) {
+ setLineId(id: number | null) {
this.lineId = id;
},
},