From f3e662798b3b83a83c2d60dc7b4e6cf1ee4f1331 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期六, 05 八月 2023 16:35:00 +0800 Subject: [PATCH] Fixed: [弱掃] p8.2 Bad use of null-like value --- PAMapp/components/Consultant/ConsultantSwiper.vue | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue index 7f01888..ae61981 100644 --- a/PAMapp/components/Consultant/ConsultantSwiper.vue +++ b/PAMapp/components/Consultant/ConsultantSwiper.vue @@ -10,17 +10,26 @@ :key="index" > <div class="consultantCardStyle" > - <UiAvatar :size="80" :fileName="agentInfo.img" class="mb-10"></UiAvatar> + <UiAvatar + class="mb-10" + :size="80" + :agentNo="agentInfo.agentNo" + > + </UiAvatar> <div class="name">{{agentInfo.name}}</div> - <div> + <div v-if="!hideReviews" style="display: flex; align-items: center; justify-content: center; margin-top: 4px"> <i class="icon-star pam-icon icon--yellow"></i> <span class="satisfaction">{{agentInfo.avgScore}}</span> </div> </div> </swiper-slide> - <div class="swiper-button-prev" slot="button-prev"></div> - <div class="swiper-button-next" slot="button-next"></div> + <div class="swiper-button-prev" slot="button-prev"> + <i class="icon-left"></i> + </div> + <div class="swiper-button-next" slot="button-next"> + <i class="icon-right"></i> + </div> </swiper> </div> </template> @@ -28,13 +37,16 @@ <script lang="ts"> import { Vue, Component, Prop } from 'vue-property-decorator'; import { SwiperOptions } from 'swiper'; -import { Consultants } from '~/assets/ts/models/consultant.model'; - +import { Consultant } from '~/shared/models/consultant.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; @Component export default class UiSwiper extends Vue { - @Prop() agents!: Consultants[]; + @Prop() + agents!: Consultant[]; + + hideReviews = hideReviews ; swiperOptions: SwiperOptions = { loop: false, slideToClickedSlide: false, @@ -53,6 +65,8 @@ } } } + + ////////////////////////////////////////////////////////////////////// clkItem(loopIndex: number, realIndex: number) { const agentNo = this.agents[loopIndex].agentNo; @@ -82,9 +96,12 @@ height: 100%; &:after { + display: none; + } + + .icon-right,.icon-left { font-size: 20px; - font-weight: bold; - color: #707A81; + color: $CORAL; } &.swiper-button-disabled { -- Gitblit v1.8.0