generated from Seekra/repository-template
Add search form submit #32 #45
@@ -1,2 +1,6 @@
|
|||||||
|
<script setup>
|
||||||
|
defineProps(['searchQuery'])
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
</template>
|
</template>
|
||||||
+6
-3
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router';
|
||||||
|
|
||||||
import SearchView from '../views/SearchView.vue';
|
import SearchView from '../views/SearchView.vue';
|
||||||
import SearchResultsView from '@/features/search/views/SearchResultsView.vue';
|
import SearchResultsView from '@/features/search/views/SearchResultsView.vue';
|
||||||
@@ -28,9 +28,12 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: '/search',
|
path: '/search',
|
||||||
name: 'searchResults',
|
name: 'searchResults',
|
||||||
component: SearchResultsView
|
component: SearchResultsView,
|
||||||
|
props: route => ({
|
||||||
|
searchQuery: route.query.q
|
||||||
|
})
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
|
|||||||
Reference in New Issue
Block a user