Ver Fonte

只读放开放大缩小按钮权限

zq há 14 horas atrás
pai
commit
5b2190e6d5
1 ficheiros alterados com 8 adições e 8 exclusões
  1. 8 8
      src/components/MindMap.vue

+ 8 - 8
src/components/MindMap.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="mind-map-container">
-    <div v-if="isEdit" class="toolbar">
-      <button @click="addParentNode">添加父节点</button>
-      <button @click="addNode">添加节点</button>
-      <button @click="addChildNode">添加子节点</button>
-      <button @click="removeNode">删除节点</button>
-      <button @click="forward">前进</button>
-      <button @click="back">回退</button>
+    <div class="toolbar">
+      <button v-if="isEdit" @click="addParentNode">添加父节点</button>
+      <button v-if="isEdit" @click="addNode">添加节点</button>
+      <button v-if="isEdit" @click="addChildNode">添加子节点</button>
+      <button v-if="isEdit" @click="removeNode">删除节点</button>
+      <button v-if="isEdit" @click="forward">前进</button>
+      <button v-if="isEdit" @click="back">回退</button>
       <button @click="zoomIn">放大</button>
       <button @click="zoomOut">缩小</button>
       <button @click="resetZoom">重置缩放</button>
-      <button @click="exportToPNG">导出PNG</button>
+      <button v-if="isEdit" @click="exportToPNG">导出PNG</button>
       <!-- <button @click="exportToSvg">导出SVG</button> -->
       <!-- <button @click="exportToJson">导出JSON</button> -->
       <!-- <button @click="importFromJson">导入JSON</button> -->