From f316bd2d97efb54ef48fde17b4e38fba2fc7b1aa Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期四, 11 一月 2024 17:17:01 +0800 Subject: [PATCH] project: remove lodash library --- PAMapp/pages/agentInfo/edit/_agentNo.vue | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/PAMapp/pages/agentInfo/edit/_agentNo.vue b/PAMapp/pages/agentInfo/edit/_agentNo.vue index e4cb6f6..cb4f9b3 100644 --- a/PAMapp/pages/agentInfo/edit/_agentNo.vue +++ b/PAMapp/pages/agentInfo/edit/_agentNo.vue @@ -264,7 +264,6 @@ import { Context } from '@nuxt/types'; import { namespace } from 'nuxt-property-decorator'; import { Vue, Component, Prop } from 'vue-property-decorator'; -import * as _ from "lodash"; import myConsultantService from '~/shared/services/my-consultant.service'; import accountSettingService from '~/shared/services/account-setting.service'; @@ -410,7 +409,7 @@ this.editInfoValue = { ...this.defaultAgentInfoSetting, - expertise: _.cloneDeep(this.defaultAgentInfoSetting.expertise), + expertise: JSON.parse(JSON.stringify(this.defaultAgentInfoSetting.expertise)), communicationStyle: this.defaultAgentInfoSetting.communicationStyle?.split('��') || [], }; } @@ -467,11 +466,11 @@ } get phoneValid(): boolean { - const rule = /^09[0-9]{8}$/; - return this.editInfoValue.phoneNumber - ? rule.test(this.editInfoValue.phoneNumber) && _.isEqual(this.editInfoValue.phoneNumber.length,10) - : true; - } + const rule = /^09[0-9]{8}$/; + return this.editInfoValue.phoneNumber + ? rule.test(this.editInfoValue.phoneNumber) && this.editInfoValue.phoneNumber.length === 10 + : true; + } get emailValid() { const rule = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; -- Gitblit v1.8.0