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/components/singleSelectBtn.vue | 28 ++++++++++++---------------- 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/PAMapp/components/singleSelectBtn.vue b/PAMapp/components/singleSelectBtn.vue index 99bc644..8fbcd3b 100644 --- a/PAMapp/components/singleSelectBtn.vue +++ b/PAMapp/components/singleSelectBtn.vue @@ -20,25 +20,21 @@ <script lang="ts"> import { Component, Prop, PropSync, Vue } from "nuxt-property-decorator"; - import * as _ from 'lodash'; + import { OptionBtnDto } from "~/shared/models/optionBtnDto.model"; + @Component export default class SingleSelectBtn extends Vue { - @PropSync('singleSelected', { default: '' }) syncSingleSelected!: string | number; - @Prop({ type:Array , default:()=>[] }) options!:OptionBtnDto[]; - // 銝餉�圾瘙箸����甈∟��嚗暺������ - patchValue(value: string): void { - this.syncSingleSelected = _.isEqual(this.syncSingleSelected, value) ? "" : value; + @PropSync('singleSelected', { default: '' }) + syncSingleSelected!: string | number; + + @Prop({ type:Array , default:()=>[] }) + options!:OptionBtnDto[]; + + ////////////////////////////////////////////////////////////////////// + patchValue(value: string | number): void { + // 銝餉�圾瘙箸����甈∟��嚗暺������ + this.syncSingleSelected = this.syncSingleSelected === value ? "" : value; } } - export interface OptionBtnDto { - title: string, - subTitle?: string, - label: string | number, - } </script> - -<style lang="scss" - scoped> - -</style> -- Gitblit v1.8.0