diff --git a/src/components/Search/Key.vue b/src/components/Search/Key.vue index 32bccd9..fd61b03 100644 --- a/src/components/Search/Key.vue +++ b/src/components/Search/Key.vue @@ -17,8 +17,13 @@ > {{ item }} -
  • - +
  • + + +
  • @@ -63,6 +68,7 @@ const letter = [ 'M' ] const current = ref(-1) +const time = ref() // 点击键盘其他按键 function handleLetter(item: string | number, index: number) { if (current.value === index) { @@ -71,11 +77,20 @@ function handleLetter(item: string | number, index: number) { if (props.word.length < 10) { emit('change', item) current.value = index + time.value = setTimeout(() => { + clearTimeout(time.value) + current.value = -1 + }, 500) } } // 删除 -function del() { +function del(index: number) { + current.value = index + time.value = setTimeout(() => { + clearTimeout(time.value) + current.value = -1 + }, 500) emit('del') } @@ -160,7 +175,11 @@ function del() { } } .active-btn { - animation: gradient 3s ease 1; + color: #fff; + background: #9b8c85; + img { + filter: invert(1) brightness(100%); + } } .del { width: 184px; @@ -169,24 +188,4 @@ function del() { } } } - -@keyframes gradient { - 0% { - background: #f4f4f4; - } - 25% { - color: #fff; - background: #9b8c85; - } - 50% { - color: #fff; - background: #9b8c85; - } - 75% { - background: #f4f4f4; - } - 100% { - background: #f4f4f4; - } -} diff --git a/src/components/Search/Result.vue b/src/components/Search/Result.vue index af3d912..5e4414b 100644 --- a/src/components/Search/Result.vue +++ b/src/components/Search/Result.vue @@ -1,6 +1,6 @@ @@ -40,7 +41,7 @@ function show(item: Shop) { padding-top: 64px; padding-left: 65px; background: #fff; - border-radius: 12px; + border-radius: 12px 12px 0 0; .myScoll { overflow: hidden; height: 630px; @@ -104,5 +105,8 @@ function show(item: Shop) { } } } + .empty { + margin-left: 45px; + } } diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index 0355c8b..0ff0c16 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -19,7 +19,7 @@ }, "dispoint": "Activity and Discount", "service": "Service", - "school": "College Of Culture", + "school": "School", "hot": "Hot Shop", "searB": "Search Brand", "road": "Traffic"