Bladeren bron

feat: 保存

gemercheung 1 jaar geleden
bovenliggende
commit
9dca029d23

+ 15 - 2
packages/qjkankan-editor/src/Store/modules/scene.js

@@ -174,10 +174,23 @@ export default {
       const currentScene = state.currentScene;
       Array.from(rootState.info.scenes).forEach((item, index) => {
         if (item.type === "pano") {
+          const isHasVlookat = () =>
+            rootState.info.scenes[index]["initVisual"].vlookat &&
+            !isNaN(rootState.info.scenes[index]["initVisual"].vlookat);
+          const isHasHlookat = () =>
+            rootState.info.scenes[index]["initVisual"].hlookat &&
+            !isNaN(rootState.info.scenes[index]["initVisual"].hlookat);
+
+          console.log("isHasVlookat", isHasVlookat(), isHasHlookat());
+
           rootState.info.scenes[index]["initVisual"] = {
             ...currentScene.initVisual,
-            vlookat: vlookat || 0,
-            hlookat: hlookat || 0,
+            vlookat: isHasVlookat()
+              ? rootState.info.scenes[index]["initVisual"].vlookat
+              : vlookat || 0,
+            hlookat: isHasHlookat()
+              ? rootState.info.scenes[index]["initVisual"].hlookat
+              : hlookat || 0,
           };
         }
       });

+ 3 - 0
packages/qjkankan-editor/src/lang/_en.json

@@ -942,6 +942,9 @@
     "loop": "Loop",
     "disabled_tip": "三维场景暂不支持添加讲解"
   },
+  "cover": {
+    "cover_tips": "您可以为当前全景图添加遮罩。"
+  },
   "style_key": {
     "menu_width": "88px",
     "play_width": "31"

+ 4 - 1
packages/qjkankan-editor/src/lang/_zh.json

@@ -847,7 +847,7 @@
     "text_num_per_line": "每行显示",
     "words": "字",
     "hotspot_title": "热点标题",
-    "show_hotspot_title":"是否显示标题",
+    "show_hotspot_title": "是否显示标题",
     "title_show_mode": "显示方式",
     "show_on_hover": "鼠标悬浮",
     "always_show": "一直显示",
@@ -926,6 +926,9 @@
     "loop": "循环播放",
     "disabled_tip": "三维场景暂不支持添加讲解"
   },
+  "cover": {
+    "cover_tips": "您可以为当前全景图添加遮罩。"
+  },
   "style_key": {
     "menu_width": "58px",
     "play_width": "0"

+ 1 - 2
packages/qjkankan-editor/src/views/cover/setting.vue

@@ -2,11 +2,10 @@
   <div class="cover-panel">
     <template v-if="currentScene.type !== '4dkk'">
       <div class="title">
-        <!-- {{ $i18n.t("explanation.explanation_settings") }} -->
         遮罩设置
         <i
           class="iconfont icon-help_i tool-tip-for-editor"
-          v-tooltip="$i18n.t('explanation.explanation_tips')"
+          v-tooltip="$i18n.t('cover.cover_tips')"
         />
       </div>
       <!-- sky start -->