|
@@ -3,7 +3,7 @@
|
|
|
<canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
|
|
|
<div class="operate" v-if="showTools">
|
|
|
<canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo" @scale="scale"
|
|
|
- @changeAbsorb="changeAbsorb" :config="config" ref="canvasFun"></canvasFun>
|
|
|
+ @changeAbsorb="changeAbsorb" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -158,6 +158,10 @@ export default {
|
|
|
changeAbsorb(isAbsorbing) {
|
|
|
this.drawMainScene.isAbsorbing = isAbsorbing;
|
|
|
},
|
|
|
+ // 保存json
|
|
|
+ saveJson() {
|
|
|
+ this.view.saveFloorJson(`${this.floor}.json`)
|
|
|
+ },
|
|
|
// 撤销
|
|
|
undo() {
|
|
|
|