File was renamed from PAMapp/components/Ui/UiSwiper.vue |
| | |
| | | @click-slide="clkItem" |
| | | > |
| | | <swiper-slide |
| | | v-for="(info, index) in agents" |
| | | v-for="(agentInfo, index) in agents" |
| | | :key="index" |
| | | > |
| | | <SwiperConsultantCard :agentInfo="info"></SwiperConsultantCard> |
| | | <div class="consultantCardStyle" > |
| | | <el-avatar class="mb-10" :size="80" :src="agentInfo.img"></el-avatar> |
| | | <div class="name">{{agentInfo.name}}</div> |
| | | <div> |
| | | <i class="icon-star pam-icon icon--yellow"></i> |
| | | <span class="satisfaction">{{agentInfo.satisfaction}}</span> |
| | | </div> |
| | | </div> |
| | | </swiper-slide> |
| | | |
| | | <div class="swiper-button-prev" slot="button-prev"></div> |
| | |
| | | |
| | | @Component |
| | | export default class UiSwiper extends Vue { |
| | | @Prop() agents!: Agents; |
| | | @Prop() agents!: Agents[]; |
| | | |
| | | swiperOptions: SwiperOptions = { |
| | | loop: true, |
| | |
| | | } |
| | | |
| | | clkItem(loopIndex: number, realIndex: number) { |
| | | this.$router.push('/agentInfo') |
| | | this.$router.push('/agentInfo'); |
| | | console.log(loopIndex, realIndex, 'clkItem') |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | .swiper-button-next,.swiper-button-prev { |
| | | background-color: $PRIMARY_WHITE; |
| | | top: 20px; |
| | | top: 0px; |
| | | height: 100%; |
| | | |
| | | &:after { |
| | |
| | | right: 0; |
| | | } |
| | | } |
| | | |
| | | .consultantCardStyle { |
| | | text-align: center; |
| | | |
| | | .name { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .satisfaction { |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | </style> |