From 2e4c8dc23c43ca97bbc475fda94b5d3ef1fd2189 Mon Sep 17 00:00:00 2001 From: liyongle Date: Sat, 6 May 2023 16:25:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E8=BD=A6=E4=BD=8D?= =?UTF-8?q?=E5=8F=B7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PlateInput/PlateInput.vue | 9 +++++---- src/composables/useParkingKeyboard.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/PlateInput/PlateInput.vue b/src/components/PlateInput/PlateInput.vue index 13af4b6..aca7272 100644 --- a/src/components/PlateInput/PlateInput.vue +++ b/src/components/PlateInput/PlateInput.vue @@ -21,7 +21,7 @@ class="btn" :class=" ((searchMethod === '车牌' && ((isEnergy && list.length === 8) || (!isEnergy && list.length === 7))) || - (searchMethod === '车位' && list.length === 6)) && + (searchMethod === '车位' && list.length !== 0)) && 'ac' " @click="confirm" @@ -61,7 +61,7 @@ function handleEnergy() { function confirm() { if ( (props.searchMethod === '车牌' && ((isEnergy.value && props.list.length === 8) || (!isEnergy.value && props.list.length === 7))) || - (props.searchMethod === '车位' && props.list.length === 6) + (props.searchMethod === '车位' && props.list.length !== 0) ) { emits('confirm') } @@ -171,9 +171,10 @@ $btn-width: 218px; color: $btn-color; background: $btn-bg; border-radius: 12px; + opacity: 0.5; box-shadow: 1px 16px 32px rgb(96 94 116 / 20%); - &.disabled { - opacity: 0.5; + &.ac { + opacity: 1; } span { white-space: nowrap; diff --git a/src/composables/useParkingKeyboard.ts b/src/composables/useParkingKeyboard.ts index da19900..a439de2 100644 --- a/src/composables/useParkingKeyboard.ts +++ b/src/composables/useParkingKeyboard.ts @@ -6,7 +6,7 @@ type SearchMethods = '车牌' | '车位' export const useParkingKeyboard = () => { const NOT_ENERGY_PLATE = 7 //非能源车牌长度 const ENERGY_PLATE = 8 //能源车牌长度 - const SPACE_MAX_LENGTH = 4 //车位最大允许长度 + const SPACE_MAX_LENGTH = 7 //车位最大允许长度 const LICENSE = ['辽', 'A'] //默认车牌前缀 const plate = ref(LICENSE.slice())