tangning 15 часов назад
Родитель
Сommit
7b3a364060

+ 1 - 0
src/api/path.ts

@@ -19,6 +19,7 @@ export interface Path {
   lineColor: string;
   lineAltitudeAboveGround: number;
   fontSize: number;
+  opacity: number;
   showDirection: boolean;
   reverseDirection: boolean;
   globalVisibility: boolean;

+ 2 - 0
src/components/path/sign.vue

@@ -40,6 +40,7 @@ const path = sdk.createPath({
   name: props.path.name,
   showName: props.path.showName,
   fontSize: props.path.fontSize,
+  opacity: props.path.opacity,
   showDirection: props.path.showDirection,
   reverseDirection: props.path.reverseDirection,
   line: getLineProps(),
@@ -50,6 +51,7 @@ console.log(getLineProps());
 
 watchEffect(() => path.visibilityName(props.path.showName));
 watchEffect(() => path.changeFontSize(props.path.fontSize));
+watchEffect(() => path.changeOpacity(props.path.opacity));
 watchEffect(() => {
   path.changeDirection(props.path.showDirection, props.path.reverseDirection);
 });

+ 1 - 0
src/store/path.ts

@@ -54,6 +54,7 @@ export const createPath = (path: Partial<Path> = {}): Path => {
     lineWidth: 0.5,
     name: '',
     fontSize: 12,
+    opacity: 1,
     showDirection: false,
     showName: true,
     visibilityRange: 30,

+ 7 - 1
src/views/guide/path/edit-path.vue

@@ -63,6 +63,12 @@
               />
             </span>
           </ui-group-option>
+          <ui-group borderBottom>
+            <ui-group-option>
+              <span>路径透明的</span>
+              <Slider v-model:value="data.opacity" :min="0" :max="1" :step="0.01" />
+            </ui-group-option>
+          </ui-group>
           <ui-group-option class="item">
             <span class="label">路径箭头</span>
             <span class="oper">
@@ -192,7 +198,7 @@ const props = defineProps<{ data: Path }>();
 defineEmits<{
   (e: "applyGlobal", k: string | string[]): void;
 }>();
-
+console.log("props",props.data);
 onUnmounted(() => {
   console.error("unmounte");
   unKeepAdding.value && unKeepAdding.value();

+ 1 - 0
src/views/guide/path/edit.vue

@@ -68,6 +68,7 @@ const edit = async (path?: Path) => {
   await asyncTimeout(16);
   if (!path) {
     path = createPath();
+    console.log('createPath', path);
     paths.value.unshift(path);
   }
   currentPath.value = path;

+ 2 - 0
src/views/setting/select-back.vue

@@ -185,9 +185,11 @@ const clickHandler = async (status: any) => {
     // 上传全景图文件并刷新列表
     await addSettingsResource(myfile.value)
     getbacksList()
+    myfile.value = null;
     showFile.value = false
   }else{
     // 取消上传,关闭弹窗
+    myfile.value = null;
     showFile.value = false
   }
 }