Przeglądaj źródła

修改取题目的方式和参数4

JXDS18FUJT 1 rok temu
rodzic
commit
866d23d2ca
1 zmienionych plików z 12 dodań i 7 usunięć
  1. 12 7
      src/components/mSkillList/index.vue

+ 12 - 7
src/components/mSkillList/index.vue

@@ -107,7 +107,9 @@ export default defineComponent({
                 model: props.model
             })
             .then((res) => {
-
+                // message.success({
+                //     content: '切换成功'
+                // })
                 list.value = res.data;
             });
 
@@ -122,9 +124,9 @@ export default defineComponent({
             type: String,
             default: 'cart'
         },
-        subject:{
-            type:String,
-            default:'1'
+        subject: {
+            type: String,
+            default: '1'
         }
     },
     watch: {
@@ -140,17 +142,20 @@ export default defineComponent({
                 });
         },
         model(nowVal, oldVal) {
-            console.log(nowVal,oldVal)
-            if(nowVal==oldVal){
+            console.log(nowVal, oldVal)
+            if (nowVal == oldVal) {
                 return
             }
+
             api.open
                 .question2InfoGetQuestionColumn({
                     subject: 'k' + (this.$route.query.subject || '1') + '_3',
                     model: nowVal
                 })
                 .then((res) => {
-
+                    message.success({
+                        content: '切换成功'
+                    })
                     this.list = res.data;
                 });
         },