Parcourir la source

编辑器-热点类型-电话、标签

任一存 il y a 2 ans
Parent
commit
d4078f5869

+ 5 - 1
packages/qjkankan-editor/src/lang/_en.json

@@ -901,7 +901,11 @@
     "text_placeholder": "Please enter no more than 500 words of text.",
     "add_video": "Add a video",
     "select_video": "Add a video",
-    "change_video": "Change a video"
+    "change_video": "Change a video",
+    "10MB_limit": "不超过10MB",
+    "text_content": "文字内容",
+    "apply_to_all": "应用到所有",
+    "phone_placeholder": "请输入电话号码"
   },
   "explanation": {
     "explanation_settings": "Voice Guide",

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

@@ -908,7 +908,8 @@
     "change_video": "更换视频",
     "10MB_limit": "不超过10MB",
     "text_content": "文字内容",
-    "apply_to_all": "应用到所有"
+    "apply_to_all": "应用到所有",
+    "phone_placeholder": "请输入电话号码"
   },
   "explanation": {
     "explanation_settings": "语音讲解",

+ 9 - 0
packages/qjkankan-editor/src/views/hotspot/HotSpotList.vue

@@ -299,6 +299,9 @@ export default {
               // updateTime: "2022-11-01 19:49",
               // userId: "13825625448",
             }
+          },
+          phoneInfo: { // 热点类型为电话时,对应数据
+            phone: '',
           }
         }
       } else {
@@ -351,6 +354,12 @@ export default {
             audio: {}
           }
         }
+        // v1.3新增
+        if (!hotspotData.phoneInfo) {
+          hotspotData.phoneInfo = {
+            phone: '',
+          }
+        }
       }
 
       this.$store.commit("SetHotspot", hotspotData)

+ 62 - 0
packages/qjkankan-editor/src/views/hotspot/hotspotType/phone.vue

@@ -0,0 +1,62 @@
+<template>
+  <div class="phone-effect-setting">
+    <div class="phone-input-wrapper">
+      <input
+        v-model.trim="hotspot.phoneInfo.phone"
+        type="text"
+        :placeholder="$i18n.t('hotspot.phone_placeholder')"
+      />
+      <!-- <span class="count">{{ hotspot.hotspotTitle.length }}/15</span> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+
+export default {
+  computed: {
+    ...mapGetters({
+      hotspot: 'hotspot',
+    }),
+  },
+}
+</script>
+
+<style lang="less" scoped>
+.phone-effect-setting {
+  >.phone-input-wrapper {
+    position: relative;
+    border: 1px solid rgba(151, 151, 151, 0.2);
+    padding: 0 16px;
+    background: #1A1B1D;
+    border-radius: 2px;
+    height: 36px;
+    width: 100%;
+    margin-top: 18px;
+    &:focus-within {
+      border-color: #0076F6;
+    }
+    >input {
+      border: none;
+      background: transparent;
+      outline: none;
+      height: 100%;
+      // width: calc(100% - 50px);
+      width: 100%;
+      padding: 0;
+      color: #fff;
+      letter-spacing: 1px;
+      font-size: 14px;
+    }
+    // >.count {
+    //   position: absolute;
+    //   top: 50%;
+    //   transform: translateY(-50%);
+    //   right: 16px;
+    //   font-size: 14px;
+    //   color: rgba(255, 255, 255, 0.2);
+    // }
+  }
+}
+</style>

+ 3 - 0
packages/qjkankan-editor/src/views/hotspot/hotspotType/tag.vue

@@ -0,0 +1,3 @@
+<template>
+  <div class="tag-effect-setting"></div>
+</template>