Kaynağa Gözat

feat: change icon

gemercheung 1 yıl önce
ebeveyn
işleme
f545581567
2 değiştirilmiş dosya ile 58 ekleme ve 17 silme
  1. 2 4
      src/model/app.vue
  2. 56 13
      src/views/setting/index.vue

+ 2 - 4
src/model/app.vue

@@ -8,15 +8,14 @@
         @click="full = 'scene'"
       >
         <!-- <ui-icon type="f-l" ctrl /> -->
-        <img src="@/assets/icon_switch.png" />
-       
+        <img src="@/assets/icon_switch.png" ctrl />
       </span>
       <div id="direction"></div>
     </div>
     <div id="scene-map" :class="{ full: full === 'map' }">
       <span class="taggle switch" v-if="full === 'scene'" @click="full = 'map'">
         <!-- <ui-icon type="f-l" ctrl /> -->
-        <img src="@/assets/icon_switch.png" />
+        <img src="@/assets/icon_switch.png" ctrl />
       </span>
 
       <span class="scale" :style="{ width: scaleInfo.width + 'px' }">
@@ -42,7 +41,6 @@ import { modelSDKFactory } from "./platform";
 import { sdk, ZoomInfo } from "@/sdk";
 import { round } from "@/utils";
 
-
 const typeChange = () => {
   const oldType = modelProps.type;
   let stopWatch = null as unknown as () => void;

+ 56 - 13
src/views/setting/index.vue

@@ -11,7 +11,22 @@
 
     <ui-group title="指北针">
       <template #icon>
-        <ui-icon
+        <ui-input
+          ctrl
+          type="switch"
+          v-model="setting.openCompass"
+          @click="
+            changeBack(
+              setting!.back,
+              setting!.backType,
+              !setting!.openCompass,
+              setting!.mapOpen,
+              setting!.mapType,
+              { scale: setting!.scale!, rotate: setting?.rotate! }
+            )
+          "
+        ></ui-input>
+        <!-- <ui-icon
           ctrl
           :type="setting?.openCompass ? 'eye-s' : 'eye-n'"
           @click="
@@ -24,13 +39,29 @@
               { scale: setting!.scale!, rotate: setting?.rotate! }
             )
           "
-        />
+        /> -->
       </template>
     </ui-group>
 
     <ui-group title="地图" v-if="caseProject!.tmProject?.latlng">
       <template #icon>
-        <ui-icon
+        <ui-input
+          ctrl
+          type="switch"
+          v-model="setting.mapOpen"
+          @click="
+            changeBack(
+              setting!.back,
+              setting!.backType,
+              setting!.openCompass,
+              !setting!.mapOpen,
+              setting!.mapType,
+              { scale: setting!.scale!, rotate: setting?.rotate! }
+            )
+          "
+        ></ui-input>
+
+        <!-- <ui-icon
           ctrl
           :type="setting?.mapOpen ? 'eye-s' : 'eye-n'"
           @click="
@@ -43,7 +74,7 @@
               { scale: setting!.scale!, rotate: setting?.rotate! }
             )
           "
-        />
+        /> -->
       </template>
       <ui-group-option v-if="setting?.mapOpen">
         <ui-input
@@ -117,12 +148,15 @@
               </a>
             </Tooltip>
 
-            <ui-icon
+            <!-- <ui-icon
               v-if="!back.sys"
               type="close"
               class="del"
               @click.stop="delBack(back)"
-            />
+            /> -->
+            <ui-button type="primary" class="del" @click.stop="delBack(back)">
+              删除
+            </ui-button>
           </div>
           <ui-input
             class="input"
@@ -204,7 +238,9 @@
         maxlength="15"
       />
       <div class="edit-hot">
-        <ui-button type="submit" @click.stop="addTemp = undefined"> 取消 </ui-button>
+        <ui-button type="submit" @click.stop="addTemp = undefined">
+          取消
+        </ui-button>
         <ui-button type="primary" @click="addBack"> 确定 </ui-button>
         <!-- <a @click="addBack">
           <ui-icon type="nav-edit" />
@@ -508,14 +544,21 @@ const iconUpload = async (data: any) => {
 
   .del {
     position: absolute;
-    background: #ef4347;
-    width: 20px;
-    height: 20px;
-    top: -10px;
-    right: -10px;
+    // background: #ef4347;
+    // width: 20px;
+    // height: 20px;
+    // top: -10px;
+    // right: -10px;
+    top: 60px;
+    left: 0;
     opacity: 0;
     // opacity: 1;
-    border-radius: 50%;
+    // border-radius: 50%;
+    :global(.ui-button) {
+      height: 28px;
+      border-top-left-radius: 0;
+      border-top-right-radius: 0;
+    }
 
     &.iconfont {
       font-size: 10px;