闫增涛
2024-06-07 5765ff097ff4b99f26220f974d865da6b9501025
src/components/examinations/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="examination" v-loading="!cardData.length">
  <div class="examination" v-loading="loading">
    <div
      v-for="(item, nindex) in cardData"
      :key="nindex"
@@ -442,20 +442,27 @@
    return {
      type: "option",
      loading: false,
      cardData:[]
      cardData:[],
      loading:true
    };
  },
  watch:{
    cardList:{
      handler(newVal) {
        console.log('11',newVal);
      }
        this.cardData = this.cardList
        if(newVal && newVal.length) {
          this.loading = false
        }
      },
      immediate:true,
      deep:true
    }
  },
  mounted() {
    this.cardData = this.cardList
    console.log('this.cardList',this.cardList);
    console.log('this.cardData',this.cardData);
    // this.cardData = this.cardList
    // console.log('this.cardList',this.cardList);
    // console.log('this.cardData',this.cardData);
  },
  methods: {
    // 数组转为字符串方法