Category "vue.js"

Nuxtjs: Access the data of the component from anonymous middleware

how can we access the data of the component (such as infos, similarPosts in this example) from the anonymous middleware in the nuxtjs application?

Enable sourcemaps in Vue-Vite

Is it possible to enable sourcemaps in Vue-Vite in production environment? I would like to use it for Bugsnag. Can't find anything about it in the docs. In dev

stop "npm install" at [..................] | idealTree:regal: sill idealTree buildDeps

when I try to run npm install it stop at this error [..................] | idealTree:regal: sill idealTree buildDeps I have tried for fix it for a long time

Proxy to SSL Endpoint with webpack-dev-server proxy

I am trying to do an axios GET request in vue3: vue.config.js module.exports = defineConfig({ transpileDependencies: true, devServer: { proxy: 'https://

How to return promise result from Vuex action instead of the promise itself?

I have an action in my vuex store: export const actions = { myaction() { return 'foo' } } Can I get the promise result (here foo) in the mounted() life

Vue : Uncaught TypeError: _ctx.toPage is not a function

when I clicked the button: it shows Uncaught TypeError: _ctx.toPage is not a function how can I fix this bug? please help me error pic <li v-for="pageLi o

Vue : Uncaught TypeError: _ctx.toPage is not a function

when I clicked the button: it shows Uncaught TypeError: _ctx.toPage is not a function how can I fix this bug? please help me error pic <li v-for="pageLi o

Toggling components depending of the current path in Nuxt

My layouts/default.vue looks like this: <template> <v-app style="background-color: transparent; color: unset"> <v-main> <ActHea

How to exclude script on certain routes in Nuxt?

I have a nuxt2-webapp with a lot of routes and for all routes except 2, I need a script to be injected. Is there a way to disable the injecting? Nuxt config: me

Trying to restrict access to a route if loggedIn condition is true

I am trying to restrict access to the login if the user is already logged in by checking if there is already a token in the localStorage. Any idea on how I can

How to prevent double invoking of the hook created?

So I have a problem with my vue3 project. The gist: I need to support different layouts for some use cases: authorization, user profile's layout, group's layout

Get and render image from API in (Vue)JS?

I have a website running VueJS at localhost:3000 which does some stuff to call this.nextImage(). methods: // content // async nextImage() { console.log("In

CORS issue when changing to ES6 import versus require

My Vue app has a backend with a different url to the front end. In my backend (node) I am using the cors module. My app is a standard express app and I was usin

Passing v-model into a checkbox inside a Component in Vue 3?

I want to embed a checkbox inside a Vue3 Component and have the v-model binding passed down to the checkbox. Inside the Component: <!-- Tile.vue --> <t

Making v-model:value lazy

I have a simple Vue component, which comes from a 3rd party package. The component is a text editor, and I have to provide it with a value for it to render corr

Loading CSS bootstrap-4 theme for sweet-alert2

I use SweetAlert2 for my project. I use VueJS and vue-cli-service with webpack. As I wanted to use the boostrap-4 theme, I followed the instructions : npm i npm

How do I fix "the requested module does not provide an export named 'default'"?

I'm developing app using JS and Vue.js and get error on line: import Vue from 'vue' I'm getting this: Uncaught SyntaxError: The requested module '/node_module

Dynamic component doesn't display anything in Vue3?

I have a dynamic component in my project like that can be "Login" or "RegisterForm" But it doesn't display anything. <script setup lang="ts"> import { re

In Vuejs3 how to make the sticky header component change background colour when intersecting with other components?

I am just wondering, how to structure my code to make my sticky <Header /> component change its background-color when intersecting with other components (

can't set initialFocus on focus-trap in vue component

I am using the focus-trap package for Vue3 to trap focus inside a form, inside of a modal. I'm having trouble with the :setInitialFocus prop, I think because th