natasha 3 years ago
parent
commit
526f93a3f1
2 changed files with 14 additions and 7 deletions
  1. 1 1
      src/components/Adult/Preview.vue
  2. 13 6
      src/components/Adult/preview/SentenceInput.vue

+ 1 - 1
src/components/Adult/Preview.vue

@@ -613,11 +613,11 @@ export default {
     },
     initContextData() {
       const _this = this;
-      console.log(_this.context);
       _this.contextData = JSON.parse(JSON.stringify(_this.context));
       _this.queIndex = 0;
       _this.NNPENewWordList = [];
       _this.NNPENewPhraseList = [];
+      _this.NNPEAnnotationList =[]
       _this.watchIndex = _this.queIndex + new Date().getTime();
       if (_this.contextData) {
         // const list = _this.contextData;

+ 13 - 6
src/components/Adult/preview/SentenceInput.vue

@@ -89,17 +89,17 @@
                 :key="conIndex + 'con'"
               >
                 <template v-if="items.detail.pyPosition == 'top'">
-                  <div
+                  <!-- <div
                     v-if="conent.pinyin == '__'"
                     contenteditable="true"
                     class="input pinyin"
                     v-html="answerList[indexs].pinyin"
                     @change="changeAnswerList($event, indexs, 'pinyin')"
-                  ></div>
+                  ></div> -->
                   <!-- 
                     v-model="answerList[indexs].pinyin"
                    -->
-                  <p class="pinyin" v-else>
+                  <p class="pinyin" v-if="conent.pinyin != '__'">
                     {{ conent.pinyin }}
                   </p>
                 </template>
@@ -109,6 +109,9 @@
                     class="input chs"
                     v-html="answerList[indexs].chs"
                     @change="changeAnswerList($event, indexs, 'chs')"
+                    @copy.native.capture.prevent="handleFalse"
+                    @paste.native.capture.prevent="handleFalse"
+                    @cut.native.capture.prevent="handleFalse"
                   ></div>
                 </template>
                 <template v-else>
@@ -120,14 +123,14 @@
                 <template
                   v-if="items.detail.pyPosition == 'bottom' && conent.pinyin"
                 >
-                  <div
+                  <!-- <div
                     v-if="conent.pinyin == '__'"
                     contenteditable="true"
                     class="input pinyin"
                     v-html="answerList[indexs].pinyin"
                     @change="changeAnswerList($event, indexs, 'pinyin')"
-                  ></div>
-                  <p class="pinyin" v-else>
+                  ></div> -->
+                  <p class="pinyin" v-if="conent.pinyin != '__'">
                     {{ conent.pinyin }}
                   </p>
                 </template>
@@ -290,8 +293,12 @@ export default {
         this.answerList[index].pinyin += e.target.innerHTML;
       } else {
         this.answerList[index].chs += e.target.innerHTML;
+        console.log(e.target.innerHTML)
       }
     },
+    handleFalse(){
+        return false;
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {