From 46da7429ca192bf6a947d79437e8076b94676a05 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 13 一月 2022 16:29:45 +0800 Subject: [PATCH] update: 刪除重複的 interface: clientInfo => appointment --- PAMapp/components/Client/ClientList.vue | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/PAMapp/components/Client/ClientList.vue b/PAMapp/components/Client/ClientList.vue index 11a77d1..2f8285c 100644 --- a/PAMapp/components/Client/ClientList.vue +++ b/PAMapp/components/Client/ClientList.vue @@ -2,14 +2,14 @@ <div> <template v-if="clients.length > 0"> <ClientCard - v-for="(client, index) in clients" - :key="index" + v-for="(client) in clients" + :key="client.id" :client="client" ></ClientCard> </template> <template v-else> - <div class="emptyRowStyle"> - <div class="smTxt txt">{{title === 'reservedList' ? '����撌脤��恥�' : '����撌脰蝯∪恥�'}}</div> + <div class="client-list--empty"> + <div class="smTxt txt">{{ noDataPlaceholder }}</div> </div> </template> </div> @@ -17,17 +17,26 @@ <script lang='ts'> import { Vue, Component, Prop } from 'nuxt-property-decorator'; -import { ClientInfo } from '~/assets/ts/api/appointment'; + +import { Appointment } from '~/shared/models/appointment.model'; @Component export default class ClientList extends Vue { - @Prop() clients!: ClientInfo[]; + @Prop() clients!: Appointment[]; @Prop() title!: string; + + ////////////////////////////////////////////////////////////////////// + + get noDataPlaceholder(): string { + return this.title === 'reservedList' + ? '����撌脤��恥�' + : '����撌脰蝯∪恥�'; + } } </script> <style lang="scss" scoped> - .emptyRowStyle { + .client-list--empty { background-color: $PRIMARY_WHITE; width: 100%; height: 100px; @@ -40,4 +49,4 @@ margin-left: 17px; } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0