Browse Source

hasOwnProperty

natasha 1 day ago
parent
commit
6338ff26d6

+ 2 - 2
src/views/book/courseware/preview/components/article/index.vue

@@ -316,7 +316,7 @@ export default {
             let trans_arr = item.translation ? item.translation.split('\n') : [];
             this.data.detail.forEach((items) => {
               let items_trans_arr = [];
-              if (!items.hasOwn('multilingualTextList')) {
+              if (!items.hasOwnProperty('multilingualTextList')) {
                 this.$set(items, 'multilingualTextList', {});
               }
               if (items.para) {
@@ -506,7 +506,7 @@ export default {
           let trans_arr = item.translation ? item.translation.split('\n') : [];
           this.data.detail.forEach((items) => {
             let items_trans_arr = [];
-            if (!items.hasOwn('multilingualTextList')) {
+            if (!items.hasOwnProperty('multilingualTextList')) {
               this.$set(items, 'multilingualTextList', {});
             }
             if (items.para) {

+ 1 - 1
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -1063,7 +1063,7 @@ export default {
       if (answer) {
         let writeModel = this.curQue.Bookanswer.writeModel;
         let hz = answer.hz;
-        if (writeModel.hasOwn(hz)) {
+        if (writeModel.hasOwnProperty(hz)) {
           writeModel[hz].push(answer);
         } else {
           writeModel[hz] = [answer];

+ 1 - 1
src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue

@@ -936,7 +936,7 @@ export default {
       if (answer) {
         let writeModel = this.curQue.Bookanswer.writeModel;
         let hz = answer.hz;
-        if (writeModel.hasOwn(hz)) {
+        if (writeModel.hasOwnProperty(hz)) {
           writeModel[hz].push(answer);
         } else {
           writeModel[hz] = [answer];

+ 2 - 2
src/views/book/courseware/preview/components/dialogue_article/index.vue

@@ -306,7 +306,7 @@ export default {
             let trans_arr = item.translation ? item.translation.split('\n') : [];
             this.data.detail.forEach((items) => {
               let items_trans_arr = [];
-              if (items && !items.hasOwn('multilingualTextList')) {
+              if (items && !items.hasOwnProperty('multilingualTextList')) {
                 this.$set(items, 'multilingualTextList', {});
               }
               if (items.para) {
@@ -499,7 +499,7 @@ export default {
           let trans_arr = item.translation ? item.translation.split('\n') : [];
           this.data.detail.forEach((items) => {
             let items_trans_arr = [];
-            if (!items.hasOwn('multilingualTextList')) {
+            if (!items.hasOwnProperty('multilingualTextList')) {
               this.$set(items, 'multilingualTextList', {});
             }
             if (items.para) {

+ 1 - 1
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -1144,7 +1144,7 @@ export default {
               oldVal.new_word_list[0].new_word &&
               val.new_word_list[0].new_word !== oldVal.new_word_list[0].new_word) ||
             (val && val.new_word_list[0].new_word && !oldVal) ||
-            (val && val.hasOwn('unified_attrib') && oldVal && !oldVal.hasOwn('unified_attrib'))
+            (val && val.hasOwnProperty('unified_attrib') && oldVal && !oldVal.hasOwnProperty('unified_attrib'))
           ) {
             // this.wordShow = isEnable(this.data.property.is_word_show);
             this.initData();