소스 검색

'添加取消编辑文案'

zhangyu 4 년 전
부모
커밋
6788ce4d96
1개의 변경된 파일15개의 추가작업 그리고 4개의 파일을 삭제
  1. 15 4
      src/components/edit/attr_select.vue

+ 15 - 4
src/components/edit/attr_select.vue

@@ -115,7 +115,7 @@
       <div v-if="type =='Image'|| type == 'Line'">
         <div class="row">
           <div class="row-tit">显示名称</div>
-          <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{editStatus[type]}}</a-button>
+          <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
         </div>
         <div class="row">
           <a-input v-model="lengedName" @change="changeLengedName" />
@@ -168,7 +168,7 @@
               type="link"
               class="edit-option-btn"
               @click="OpenEditStatus"
-            >{{editStatus[type]}}</a-button>
+            >{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
           </div>
           <div class="row">
             <a-input v-model="lengedName" @change="changeLengedName" />
@@ -192,7 +192,7 @@
           <!-- 石材铺装 -->
           <div class="row">
             <div class="row-tit">图例说明</div>
-            <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">编辑区域</a-button>
+            <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
           </div>
           <div class="row">
             <a-textarea
@@ -231,7 +231,7 @@
               type="link"
               class="edit-option-btn"
               @click="OpenEditStatus"
-            >{{editStatus[type]}}</a-button>
+            >{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
           </div>
           <div class="row">
             <a-input v-model="lengedName" @change="changeLengedName" />
@@ -312,6 +312,7 @@ import Swatches from "vue-swatches";
 import bus from "@/bus";
 import "vue-swatches/dist/vue-swatches.css";
 import { SLineStyle } from "@saga-web/graph/lib";
+import { SItemStatus } from "@saga-web/big";
 import {
   uploadImg,
   queryGlsmsLocation,
@@ -416,6 +417,7 @@ export default {
       itemExplain: "", //图例说明 只针对石材铺装
       attrCards: [],
       spinning: false,
+      isEdit: false,
       getmajorId: "",
       InfoLocal:[]
     };
@@ -519,6 +521,7 @@ export default {
     },
     //设置缩小item为编辑状态
     OpenEditStatus() {
+      this.isEdit = !this.isEdit;
       bus.$emit("OpenEditStatus");
     },
     // 编辑图例说明
@@ -594,6 +597,13 @@ export default {
           newval.itemType == "Line" ||
           newval.itemType == "Image"
         ) {
+          setTimeout(() => {
+            if (Item.status == SItemStatus.Edit) {
+              this.isEdit = true;
+            } else {
+              this.isEdit = false;
+            }
+          }, 300)
           if (newval.itemType == "Image") {
             this.imageNum = Item.num;
             this.lengedName = Item.name;
@@ -709,6 +719,7 @@ export default {
         width: 26px !important;
         height: 26px !important;
         border-radius: 2px !important;
+        border: 1px solid #dcdcdc;
       }
     }
     .row-tit {