generated from Seekra/repository-template
Add search query model
This commit is contained in:
@@ -14,9 +14,19 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
const searchQuery = defineModel();
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<input type="search" name="search" placeholder="Search..." required />
|
<input
|
||||||
|
v-model="searchQuery"
|
||||||
|
type="search"
|
||||||
|
name="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
required
|
||||||
|
/>
|
||||||
<button type="submit" class="search-button">Search</button>
|
<button type="submit" class="search-button">Search</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ limitations under the License.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Searchbar from '../features/search/components/Searchbar.vue'
|
import Searchbar from '../features/search/components/Searchbar.vue';
|
||||||
|
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
const searchQuery = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -27,7 +31,7 @@ import Searchbar from '../features/search/components/Searchbar.vue'
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<form class="search-form">
|
<form class="search-form">
|
||||||
<Searchbar />
|
<Searchbar v-model="searchQuery" ref="searchbar" />
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user