| | |
| | | <template> |
| | | <div class="examination" v-loading="!cardData.length"> |
| | | <div class="examination" v-loading="loading"> |
| | | <div |
| | | v-for="(item, nindex) in cardData" |
| | | :key="nindex" |
| | |
| | | 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 |
| | | } |
| | | }, |
| | | 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: { |
| | | // 数组转为字符串方法 |