liyongli пре 1 година
родитељ
комит
9122e5d882
1 измењених фајлова са 7 додато и 5 уклоњено
  1. 7 5
      src/view/allMedia/AIeditor/components/review.vue

+ 7 - 5
src/view/allMedia/AIeditor/components/review.vue

@@ -136,7 +136,8 @@ const err_text = ref([
 ]);
 const geterrNum = i => {
   let n = 0;
-  for (let o = 0; o < li.length; o++) {
+  if(i === 0) n = li.length;
+  else for (let o = 0; o < li.length; o++) {
     const v = li[o];
     v.errorType === i && n++;
   }
@@ -145,11 +146,12 @@ const geterrNum = i => {
 
 const selectList = i => {
   const index = !i && i !== 0 ? select.value : i;
-  select.value = index;
   let l = [];
-  for (let o = 0; o < li.length; o++) {
+  if(index === 0 ) l = li;
+  else for (let o = 0; o < li.length; o++) {
     if (index === 0 || li[o].errorType === index) l.push(li[o]);
   }
+  if (l.length) select.value = index;
   return l;
 };
 
@@ -181,9 +183,9 @@ const jiaoyue = () => {
         );
       }
       props.setHtml(html);
-      nextTick(()=>{
+      nextTick(() => {
         props.setisupText(false);
-      })
+      });
     })
     .catch(() => {
       is_status.value = 'none';