[Vuejs]-Nuxt โ€“ Using router.push inside a component not changing pages correctly

1๐Ÿ‘

You have to scope your css from the index.vue page to the other pages with the scoped directive (see docs https://vue-loader.vuejs.org/guide/scoped-css.html)

<style scoped>
/* local styles */
</style>

<style>
/* global styles */
</style>

You can add your global CSS in your layouts/default.vue file.

-1๐Ÿ‘

This solved the issue โ€“

methods: {
    onSubmit() {
        window.location = 'http://localhost:3000/jobs?q=' + this.form.keyword;
    }
},

Leave a comment