From 0632b21db7576e4a223eb4f6ca09b650616222f2 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 17 一月 2024 09:54:09 +0800 Subject: [PATCH] Fixed: 移除 lodash, @type/lodash 導致的 side-effect --- PAMapp/components/BackActionBar.vue | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/PAMapp/components/BackActionBar.vue b/PAMapp/components/BackActionBar.vue index ab32947..c6c5ef7 100644 --- a/PAMapp/components/BackActionBar.vue +++ b/PAMapp/components/BackActionBar.vue @@ -11,7 +11,6 @@ import { namespace } from 'nuxt-property-decorator'; import { Vue, Component,} from 'vue-property-decorator'; -import * as _ from 'lodash'; import { Role } from '~/shared/models/enum/Role'; const appointmentStore = namespace('appointment.store'); @@ -54,7 +53,7 @@ break; case 'agentInfo': const agentFeatureLabel = this.$route.name.includes('edit') ? '蝺刻摩撣唾����' : '���董�����'; - featureLabel = _.isEqual(this.currentRole,Role.ADMIN) + featureLabel = this.currentRole === Role.ADMIN ? agentFeatureLabel : '璆剖�鞈��' break; @@ -74,23 +73,28 @@ case 'accountSetting': featureLabel = '�犖撣唾�身摰�'; break; - case 'appointmentAgenda': - featureLabel = '�撠�赤����'; - break; case 'consultantAccountSetting': featureLabel = '���董�����'; break; case 'faq': - featureLabel = 'F&Q 撣貉����'; + featureLabel = 'FAQ 撣貉����'; break; case 'appointment': const appointmentFeatureLabel = this.$route.name.includes('close') ? '蝯��' - : this.isCloseAppointment ? '蝯����' : '������'; + : this.isCloseAppointment ? '蝯��敦' : '������'; const inInterview = this.$route.name.includes('interview'); const addNewInterview = this.$route.name.includes('new'); - if (inInterview) { - featureLabel = addNewInterview ? '�憓�赤蝝����' : '蝺刻摩蝝赤蝝����'; + const interviewList = this.$route.name.includes('interviewList'); + const recordList = this.$route.name.includes('recordList'); + if (interviewList) { + featureLabel = '蝝赤蝝����'; + } else if (recordList) { + featureLabel = '蝟餌絞�蝝����'; + } else if (inInterview) { + featureLabel = addNewInterview + ? '�憓�赤蝝����' + : '蝺刻摩蝝赤蝝����'; } else { featureLabel = appointmentFeatureLabel; } -- Gitblit v1.8.0