lsc 2 سال پیش
والد
کامیت
f5646a94a0
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/components/pages/student/addCourse.vue

+ 3 - 1
src/components/pages/student/addCourse.vue

@@ -7051,7 +7051,9 @@ export default {
         .get(this.$store.state.api + "getCourseTemplateTs", params)
         .then((res) => {
           if (res.data[0].length) {
-            this.templateArray = [...res.data[0], ...this.templateArray];
+            let ta = res.data[0]
+            let newArr2 = this.templateArray.filter(x => !ta.some(y => y.id === x.id));
+            this.templateArray = [...newArr2, ...this.templateArray];
           }
           this.$forceUpdate();
         })