Browse Source

修改问题

haojianlong 4 năm trước cách đây
mục cha
commit
db11dac899
2 tập tin đã thay đổi với 14 bổ sung9 xóa
  1. 9 9
      src/components/baseEditer.vue
  2. 5 0
      src/components/edit/right_toolbar.vue

+ 9 - 9
src/components/baseEditer.vue

@@ -190,9 +190,9 @@ export default {
     // 读取绘制数据
     readGraph() {
       this.readGroup().then(data => {
-        this.graphId = data.Data[0].ID;
-        bus.$emit("setGraphId", this.graphId);
         if (data.Data) {
+          this.graphId = data.Data[0].ID;
+          bus.$emit("setGraphId", this.graphId);
           const parserData = new STopologyParser(null);
           const itemMap = {};
           parserData.parseData(data.Data[0].Elements);
@@ -266,14 +266,14 @@ export default {
               t.endAnchor = endAnc || null;
             }
           });
-          this.view.fitSceneToView();
-            // 设置初始化缩放比例
-          this.initScale = this.view.scale;
-          this.view.maxScale = this.initScale * 10;
-          this.view.minScale = this.initScale / 10;
-          bus.$emit("initScale", this.view.scale);
-          bus.$emit("elementDataChange", this.scene);
         }
+        this.view.fitSceneToView();
+          // 设置初始化缩放比例
+        this.initScale = this.view.scale;
+        this.view.maxScale = this.initScale * 10;
+        this.view.minScale = this.initScale / 10;
+        bus.$emit("initScale", this.view.scale);
+        bus.$emit("elementDataChange", this.scene);
         this.loadings.close()
       });
     },

+ 5 - 0
src/components/edit/right_toolbar.vue

@@ -325,6 +325,11 @@ li {
           display: inline-block;
           vertical-align: top;
           line-height: 38px;
+          width: calc(100% - 45px);
+          height: 100%;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
         }
         &:hover {
           background: #f5f6f7;