Skip to content

Commit ef5bec4

Browse files
refactor: use model-value
1 parent e8ac1e1 commit ef5bec4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

app/components/AppHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ onKeyStroke(
147147
class="max-w-sm"
148148
:class="{ 'max-w-md': !isSearchExpanded }"
149149
compact
150-
v-model:search-query="searchQuery"
150+
v-model="searchQuery"
151151
@submit="handleSearchSubmit"
152152
@focus="handleSearchFocus"
153153
@blur="handleSearchBlur"

app/components/SearchBox.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
defineProps<{
3-
searchQuery: string
43
compact?: boolean
54
}>()
65
@@ -10,7 +9,7 @@ const emit = defineEmits<{
109
(e: 'focus'): void
1110
}>()
1211
13-
const searchQuery = defineModel<string>('searchQuery', {
12+
const searchQuery = defineModel<string>({
1413
default: '',
1514
})
1615

app/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ defineOgImageComponent('Default', {
5555
<SearchBox
5656
class="max-w-xl motion-safe:animate-slide-up motion-safe:animate-fill-both"
5757
style="animation-delay: 0.2s"
58-
v-model:search-query="searchQuery"
58+
v-model="searchQuery"
5959
@submit="handleSearchSubmit"
6060
/>
6161

0 commit comments

Comments
 (0)