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())