浏览代码

feat : vue slider tooltip

gemercheung 1 年之前
父节点
当前提交
c51d099cd5

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

@@ -133,7 +133,7 @@ export default {
     setMetaData(state, payload) {
       state.metadata = payload;
       if (location.href.includes("show.html")) {
-        document.title = payload.name || i18n.t("common.notit");
+        document.title = payload.name || i18n.t("gather.no_title");
       }
     },
   },

+ 3 - 0
packages/qjkankan-editor/src/framework/EditorMain.vue

@@ -46,6 +46,9 @@ export default {
     min-height: 100%;
     overflow-y: scroll;
     display: flex;
+    &::-webkit-scrollbar {
+      width: 1px;
+    }
     > div {
       flex: 1;
     }

+ 1 - 1
packages/qjkankan-editor/src/mixins/debuggerHelper.js

@@ -1,6 +1,6 @@
 import Vue from "vue";
 export const debuggerHelper = (show = true) => {
-  const version = "1.6.0--" + process.env.VUE_APP_DEBBUG_FLAG;
+  const version = "1.7.0--" + process.env.VUE_APP_DEBBUG_FLAG;
   if (show) {
     // log.setColors({
     var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";

+ 45 - 35
packages/qjkankan-editor/src/views/navigation/initialSceneSettings.vue

@@ -1,30 +1,42 @@
 <template>
   <div class="initial-scene-settings" app-border dir-left>
     <div class="initial-scene-settings__title">
-      {{$i18n.t('navigation.init_scene')}}
-      <i class="iconfont icon-help_i tool-tip-for-editor" v-tooltip="$i18n.t('navigation.init_scene_tips')"/>
+      {{ $i18n.t("navigation.init_scene") }}
+      <i
+        class="iconfont icon-help_i tool-tip-for-editor"
+        v-tooltip="$i18n.t('navigation.init_scene_tips')"
+      />
     </div>
-    
-    <img class="preview" v-if="info.firstScene" :src="info.firstScene.icon" alt="">
-    <img class="placeholder" v-else src="@/assets/images/pano-image-placeholder.png" alt="">
+
+    <img
+      class="preview"
+      v-if="info.firstScene"
+      :src="info.firstScene.icon"
+      alt=""
+    />
+    <img
+      class="placeholder"
+      v-else
+      src="@/assets/images/pano-image-placeholder.png"
+      alt=""
+    />
 
     <div class="change-init" v-if="info.firstScene">
-      <button class="ui-button deepcancel" @click="deleteIndexInfo">{{$i18n.t('navigation.delete_init_scene')}}</button>
-      <button @click="showInitScene=true" class="ui-button submit">
-        {{$i18n.t('navigation.edit_init_scene')}}
+      <button class="ui-button deepcancel" @click="deleteIndexInfo">
+        {{ $i18n.t("navigation.delete_init_scene") }}
+      </button>
+      <button @click="showInitScene = true" class="ui-button submit">
+        {{ $i18n.t("navigation.edit_init_scene") }}
       </button>
     </div>
     <div class="set-init" v-else>
-      <button @click="showInitScene=true" class="ui-button submit">
-        {{$i18n.t('navigation.setting_init_scene')}}
+      <button @click="showInitScene = true" class="ui-button submit">
+        {{ $i18n.t("navigation.setting_init_scene") }}
       </button>
     </div>
 
     <div class="dialog" style="z-index: 2000" v-if="showInitScene">
-      <Selector
-        @cancel="showInitScene = false"
-        @submit="handleSelect"
-      />
+      <Selector @cancel="showInitScene = false" @submit="handleSelect" />
     </div>
 
     <!-- <div class="dialog" style="z-index: 2000" v-if="showInitScene">
@@ -44,39 +56,37 @@ import { mapGetters } from "vuex";
 import Selector from "@/components/materialSelectorFromWork.vue";
 
 export default {
-  components:{
+  components: {
     Selector,
   },
-  data(){
+  data() {
     return {
-      showInitScene:false
-    }
+      showInitScene: false,
+    };
   },
-  methods:{
-    deleteIndexInfo(){
+  methods: {
+    deleteIndexInfo() {
       this.$confirm({
-          content: this.$i18n.t('tips.delete'),
-          ok: () => {
-              this.info.firstScene = ''
-              this.$store.commit("SetInfo", this.info);
-              this.$msg.success(this.$i18n.t('tips.delete_done'))
-          }
+        content: this.$i18n.t("tips.delete"),
+        ok: () => {
+          this.info.firstScene = "";
+          this.$store.commit("SetInfo", this.info);
+          this.$msg.success(this.$i18n.t("tips.delete_done"));
+        },
       });
-      
     },
     handleSelect(data) {
-      this.info.firstScene = data[0] // 注意此处是浅拷贝
-      this.showInitScene = false
-    }
+      this.info.firstScene = data[0]; // 注意此处是浅拷贝
+      this.showInitScene = false;
+    },
   },
   computed: {
     ...mapGetters({
       info: "info",
-    })
+    }),
   },
-  mounted(){
-  }
-}
+  mounted() {},
+};
 </script>
 
 <style lang="less" scoped>
@@ -130,4 +140,4 @@ export default {
     background-color: rgba(0, 0, 0, 0.5);
   }
 }
-</style>
+</style>

+ 4 - 2
packages/qjkankan-editor/src/views/screen/Setting.vue

@@ -33,7 +33,8 @@
           :width="`95%`"
           :marks="marks"
           direction="rtl"
-          :tooltip="'none'"
+          tooltip="active"
+          :tooltip-formatter="formatterMarks"
           :processStyle="{
             backgroundColor: '#409eff',
           }"
@@ -96,9 +97,10 @@ export default {
   },
   data() {
     return {
+      formatterMarks: (v) => `${v * -1}`,
       marks: {
         "-90": this.$i18n.t("modules.model.attr_top"),
-        90:  this.$i18n.t("modules.model.attr_bottom"),
+        90: this.$i18n.t("modules.model.attr_bottom"),
       },
       initImg: "",
       vlookat: [-90, 90],

+ 1 - 1
packages/qjkankan-view/src/utils/debuggerHelper.js

@@ -2,7 +2,7 @@
 import { useToast } from "vue-toastification";
 
 export const debuggerHelper = (show = true) => {
-  const version = "1.6.0--" + process.env.VUE_APP_DEBBUG_FLAG;
+  const version = "1.7.0--" + process.env.VUE_APP_DEBBUG_FLAG;
   if (show) {
     // log.setColors({
     var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";