natasha 2 rokov pred
rodič
commit
854c8c65d2

+ 27 - 1
src/components/Adult/preview/ArticleViewChs/PhraseModelChs.vue

@@ -647,8 +647,34 @@ export default {
             break;
           }
         }
+        this.showNoteDetail(e, noteIndex);
+      }else{
+        if (this.newWordList.indexOf(noteNum) > -1) {
+            if (_this.oldHz != noteNum) {
+            this.isShow = false;
+            setTimeout(() => {
+                _this.hz = noteNum;
+            }, 50);
+            }
+            _this.clientY = e.clientY;
+            let left = e.clientX;
+            let width = 0;
+
+            if (noteNum.length == 1 || noteNum.length == 2) {
+                width = 304;
+            } else if (noteNum.length == 3 || noteNum.length == 4) {
+                width = 432;
+            } else if (noteNum.length > 3) {
+                width = 560;
+            }
+
+            if (left - this.bodyLeft > this.contentWidth / 2) {
+                _this.left = left - width + 10;
+            } else {
+                _this.left = left;
+            }
+        }
       }
-      this.showNoteDetail(e, noteIndex);
     },
     showNoteDetail(e, noteNum) {
       let _this = this;

+ 28 - 1
src/components/Adult/preview/DialogueArticleViewChs/PhraseModelChs.vue

@@ -701,6 +701,7 @@ export default {
     },
 
     showWordDetail(e, word) {
+
       let _this = this;
       if (this.newWordList.indexOf(word) > -1) {
         if (_this.oldHz != word) {
@@ -764,8 +765,34 @@ export default {
             break;
           }
         }
+        this.showNoteDetail(e, noteIndex);
+      }else{
+        if (this.newWordList.indexOf(noteNum) > -1) {
+            if (_this.oldHz != noteNum) {
+            this.isShow = false;
+            setTimeout(() => {
+                _this.hz = noteNum;
+            }, 50);
+            }
+            _this.clientY = e.clientY;
+            let left = e.clientX;
+            let width = 0;
+
+            if (noteNum.length == 1 || noteNum.length == 2) {
+                width = 304;
+            } else if (noteNum.length == 3 || noteNum.length == 4) {
+                width = 432;
+            } else if (noteNum.length > 3) {
+                width = 560;
+            }
+
+            if (left - this.bodyLeft > this.contentWidth / 2) {
+                _this.left = left - width + 10;
+            } else {
+                _this.left = left;
+            }
+        }
       }
-      this.showNoteDetail(e, noteIndex);
     },
     showNoteDetail(e, noteNum) {
       let _this = this;