From f6a21bf37ef56ecab88652b1449da63f73b9648a Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期二, 16 十一月 2021 20:59:28 +0800
Subject: [PATCH] update 我的顧問清單: 使用 store 存放 consultantList 以及新增顧問、移除顧問的狀態控制

---
 PAMapp/components/Consultant/ConsultantList.vue |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index e4a735d..130fbcf 100644
--- a/PAMapp/components/Consultant/ConsultantList.vue
+++ b/PAMapp/components/Consultant/ConsultantList.vue
@@ -1,19 +1,19 @@
 <template>
     <div>
+
         <template v-if="agents.length > 0">
             <ConsultantCard
                 v-for="(agent, index) in agents"
                 :key="index"
                 :agentInfo="agent"
-                @removeAgent="removeAgent"
             ></ConsultantCard>
         </template>
-        <template v-else>
+        <template v-if="isLogin && agents.length === 0">
             <div class="emptyRowStyle">
                 <div class="smTxt txt">����撌脤憿批��</div>
             </div>
         </template>
-        <template v-if="!isLogin && agents.length > 0">
+        <template v-if="!isLogin">
             <div class="emptyRowStyle">
                 <div class="mdTxt login" @click="$router.push('/login')">��</div>
                 <div class="smTxt txt">���憭�</div>
@@ -23,7 +23,7 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator';
+import { Vue, Component, Prop } from 'nuxt-property-decorator';
 import { Consultants } from '~/assets/ts/api/consultant';
 import { isLogin } from '~/assets/ts/auth';
 
@@ -35,9 +35,6 @@
         return isLogin();
     }
 
-    @Emit('removeAgent') removeAgent(agentId: number) {
-        return agentId;
-    }
 }
 </script>
 

--
Gitblit v1.8.0