gemercheung 2 jaren geleden
bovenliggende
commit
35cad1428d

+ 1 - 1
packages/qjkankan-editor/.env.testprod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0508-02
+VUE_APP_DEBBUG_FLAG=0509-01

+ 21 - 5
packages/qjkankan-editor/src/components/RichTextEditor.vue

@@ -1,5 +1,10 @@
 <template>
   <div class="rich-text-editor">
+    <div class="editor-title">
+      <div class="title">
+        <span> {{ $i18n.t("hotspot.edit_article_title") }}</span>
+      </div>
+    </div>
     <Toolbar
       style="border-bottom: 1px solid #ccc"
       :editor="editor"
@@ -14,7 +19,7 @@
       @onCreated="onEditorCreated"
     />
     <div class="bottom-bar">
-      <button class="ui-button" @click="onClickCancel">
+      <button class="ui-button deepcancel" @click="onClickCancel">
         {{ $i18n.t("common.cancel") }}
       </button>
       <button class="ui-button submit" @click="onClickOk">
@@ -106,7 +111,6 @@ export default Vue.extend({
       if (lang === "zh") {
         i18nChangeLanguage("zh-CN");
       }
-
     },
     onClickOk() {
       this.$emit("ok", this.html);
@@ -148,17 +152,29 @@ export default Vue.extend({
 <style lang="less" scoped>
 .rich-text-editor {
   // border: 1px solid #ccc;
+  .editor-title {
+    height: 64px;
+    .title {
+      font-size: 18px;
+      color: rgba(255, 255, 255, 0.6);
+      line-height: 24px;
+    }
+  }
   border-radius: 4px;
   overflow: hidden;
+  padding: 26px;
+  background-color: rgba(26, 27, 29, 1);
   > .bottom-bar {
-    padding: 10px;
-    background-color: rgba(0, 0, 0, 0.8);
-    border-top: 1px solid #ccc;
+    padding: 10px 26px 0 26px;
+    margin: 40px -26px 0 -26px;
+    background-color: rgba(26, 27, 29, 1);
+    // border-top: 1px solid #ccc;
     display: flex;
     justify-content: flex-end;
     align-items: center;
     > button {
       margin-left: 10px;
+   
     }
   }
 }

+ 15 - 12
packages/qjkankan-editor/src/framework/EditorHead.vue

@@ -173,10 +173,10 @@ export default {
       if (this.info.coverInfo.isShowCover === 1) {
         if (this.info.coverInfo.coverSelect === "videoAndImg") {
           if (
-            this.info.coverInfo.coverPc === "" ||
-            this.info.coverInfo.coverMo === "" ||
-            this.info.coverInfo.videoPc === "" ||
-            this.info.coverInfo.videoMo === ""
+            !this.info.coverInfo.coverPc ||
+            !this.info.coverInfo.coverMo ||
+            !this.info.coverInfo.videoPc ||
+            !this.info.coverInfo.videoMo
           ) {
             this.$msg.warning(this.$i18n.t("gather.converinfo_no_valid"));
             return false;
@@ -184,8 +184,10 @@ export default {
         }
         if (this.info.coverInfo.coverSelect === "video") {
           if (
-            this.info.coverInfo.videoPc === "" ||
-            this.info.coverInfo.videoMo === ""
+            !this.info.coverInfo.videoPc ||
+            !this.info.coverInfo.videoMo ||
+            this.info.coverInfo.videoPc == "" ||
+            this.info.coverInfo.videoMo == ""
           ) {
             this.$msg.warning(this.$i18n.t("gather.converinfo_no_valid"));
             return false;
@@ -193,8 +195,10 @@ export default {
         }
         if (this.info.coverInfo.coverSelect === "img") {
           if (
-            this.info.coverInfo.coverPc === "" ||
-            this.info.coverInfo.coverMo === ""
+            !this.info.coverInfo.coverPc ||
+            !this.info.coverInfo.coverMo ||
+            this.info.coverInfo.coverPc == "" ||
+            this.info.coverInfo.coverMo == ""
           ) {
             this.$msg.warning(this.$i18n.t("gather.converinfo_no_valid"));
             return false;
@@ -224,10 +228,9 @@ export default {
             target.fodderId = [target.audio.id].map((i) => i);
             break;
           case "imageText":
-            fodderId = target.imageTextInfo.imageList.reduce(
-              (p, c) => p.concat(c["id"]),
-              []
-            ).map((i) => i);
+            fodderId = target.imageTextInfo.imageList
+              .reduce((p, c) => p.concat(c["id"]), [])
+              .map((i) => i);
             target.imageTextInfo.audio.id &&
               fodderId.push(target.imageTextInfo.audio.id);
             target.fodderId = fodderId;

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

@@ -911,7 +911,9 @@
     "change_pdf": "Change the PDF",
     "pdf_invalid_tip": "Please upload PDF files within 50M",
     "add_article": "Add Paragraph",
-    "edit_article": "Edit paragraph",
+
+    "edit_article_title":"Edit paragraph",
+    "edit_article":"Edit paragraph",
     "cancel_add_hotspot": "The edited content will not be saved, confirm to close it"
   },
   "explanation": {

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

@@ -912,6 +912,7 @@
     "change_pdf": "更换PDF",
     "pdf_invalid_tip": "请选择50MB以内、PDF格式的文件",
     "add_article": "添加文章内容",
+    "edit_article_title": "编辑文章",
     "edit_article": "编辑文章内容",
     "cancel_add_hotspot": "已编辑内容将不会保存,确定要关闭吗?"
   },

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

@@ -5,7 +5,7 @@ export const debuggerHelper = (show = true) => {
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
-        console.log(`%c 👉:当前版本::---> 1.3.0--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+        console.log(`%c 👉:当前版本::---> 1.3.1--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
 
     }
 

+ 11 - 6
packages/qjkankan-editor/src/views/base/customButtonSettings.vue

@@ -156,7 +156,6 @@
               class="selector"
               :valueList="buttonOpenMethodList"
               v-model="editingInfo.openMethod"
-              @input="handleClearCurrentValue"
             />
           </div>
         </div>
@@ -213,6 +212,7 @@ export default {
       // buttonTypeList: ["phone", "link"],
       // buttonOpenMethodList: ["_self", "_target"],
       isEditing: false,
+
       editingButtonIdx: -1,
       editingInfo: {
         type: "",
@@ -293,10 +293,13 @@ export default {
   watch: {
     "editingInfo.type": {
       handler(newValue) {
-        console.log("editingInfo.type", newValue, this.customButton);
+        console.log("editingInfo.type", newValue);
         const item = this.buttonTypeList.find((i) => i.id === newValue);
-        console.log("label", item);
-        this.editingInfo.name = item.label;
+        const current = this.info.customButton[this.editingButtonIdx];
+        console.log("current.name", current.name);
+        if (current.name.length === 0) {
+          this.editingInfo.name = item.label;
+        }
       },
     },
   },
@@ -332,8 +335,10 @@ export default {
     // this.handleclearifyData();
   },
   methods: {
-    handleClearCurrentValue() {
-      // this.editingInfo.value = "";
+    handleClearCurrentValue(id) {
+      this.editingInfo.value = "";
+      const item = this.buttonTypeList.find((i) => i.id === id);
+      this.editingInfo.name = item.label;
     },
     getButtonTypeI18n(buttonType) {
       if (buttonType === "phone") {

+ 1 - 1
packages/qjkankan-view/.env.testprod

@@ -6,4 +6,4 @@ VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_URL_FILL=/qjkankan
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0508-01
+VUE_APP_DEBBUG_FLAG=0509-01

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

@@ -5,7 +5,7 @@ export const debuggerHelper = (show = true) => {
         // log.setColors({
         var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
-        console.log(`%c 👉:当前版本::---> 1.3.0--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
+        console.log(`%c 👉:当前版本::---> 1.3.1--${process.env.VUE_APP_DEBBUG_FLAG}`,css);
 
     }