瀏覽代碼

拼音切换大小写不重新调用接口问题

natasha 1 月之前
父節點
當前提交
60ad8b0b17
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/views/book/courseware/create/components/question/table/Table.vue

+ 3 - 2
src/views/book/courseware/create/components/question/table/Table.vue

@@ -220,7 +220,8 @@ export default {
       deep: true,
     },
     'data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case': {
-      handler(val) {
+      handler(val, oldVal) {
+        if (val === oldVal) return;
         let text = '';
         this.data.option_list.forEach((item) => {
           item.forEach((items) => {
@@ -231,7 +232,7 @@ export default {
           this.data.paragraph_list = [];
           return;
         }
-        if (text && isEnable(this.data.property.view_pinyin) && this.data.paragraph_list.length <= 0) {
+        if (text && isEnable(this.data.property.view_pinyin)) {
           this.data.paragraph_list_parameter.text = text;
           this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case = val;
           this.createParsedTextInfoPinyin(text);