From 1adfdb0ffed271b97cf88471c94ab2735dc12b35 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期六, 05 八月 2023 17:43:34 +0800 Subject: [PATCH] Fixed: [弱掃] p13.1 Bad use of null-like value --- PAMapp/components/Appointment/AppointmentInterviewList.vue | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/PAMapp/components/Appointment/AppointmentInterviewList.vue b/PAMapp/components/Appointment/AppointmentInterviewList.vue index dc06f5b..92fe2cc 100644 --- a/PAMapp/components/Appointment/AppointmentInterviewList.vue +++ b/PAMapp/components/Appointment/AppointmentInterviewList.vue @@ -2,28 +2,40 @@ <div> <div class="interview__header"> <div class="mdTxt">蝝赤蝝����</div> - <div class="pam-link-button--lg" + <div class="pam-link-button" @click="addInterview">+�憓�</div> </div> - <InterviewCard :interviewList="displayList.slice(0, 3)"></InterviewCard> - <section class="text--right mt-30" v-if="interviewList.length > 3"> - <div class="pam-link-button--lg" @click="readMoreBtn">撅��憭�</div> + <InterviewCard :interviewList="displayAppointmentList"></InterviewCard> + + <section class="text--right mt-30 interview-check-more" v-if="interviewList.length > 3"> + <div class="pam-link-button" @click="readAllList = !readAllList"> + {{ readAllList ? '憿舐內頛��' : '撅��憭�' }} + <i :class="readAllList ? 'icon-top' : 'icon-down'"></i> + </div> </section> </div> </template> <script lang="ts"> -import { Vue, Component, Prop, Watch } from 'nuxt-property-decorator'; +import { Vue, Component, Prop, Watch, namespace } from 'nuxt-property-decorator'; + import { InterviewRecord } from '~/shared/models/appointment.model'; @Component export default class AppointmentInterviewList extends Vue { + @Prop() interviewList!: InterviewRecord[]; appointmentId!: string; displayList: InterviewRecord[] = []; + readAllList = false; + + get displayAppointmentList(): InterviewRecord[] { + return this.readAllList ? this.displayList : this.displayList.slice(0, 3); + } + ////////////////////////////////////////////////////////////////////// @@ -48,10 +60,6 @@ this.$router.push(`/appointment/${this.appointmentId}/interview/new`); } - readMoreBtn() { - this.$router.push(`/appointment/${this.appointmentId}/interviewList`); - } - } </script> @@ -61,4 +69,8 @@ justify-content: space-between; margin-bottom : 10px; } +.interview-check-more{ + display: flex; + justify-content: center; +} </style> -- Gitblit v1.8.0