Category "vue.js"

Vue.js 3 use autofocus on input with ref inside a method

I worked with Vue2, but I recently try Vue 3. I have simple problem: <input ref="myinput" /> <button @click="submitData" /> I want to set "focus"

Extract modelValue logic to composable

I'm transitioning from Vue 2 to Vue 3 and I'm having trouble with composables. I have a bunch of components that inherits modelValue. So, for every component th

Vue.js 3: Cannot import Vue global object

I'm going crazy trying to reconcile the Vue 3 CLI output into something that works with various tutorials and plugins that all use the Vue object, as in Vue.cre

Check if a component has an event listener attached to it

Assuming there's some <Form> component. It can be called with a @cancel event listener attached to it and if it's the case, I want to show the cancel butt

how to work with v-select inside b-table?

I'm working with v-select elements inside a b-table but i've a problem when i put the "responsive" property in my b-table. It looks as if the v-select is contai

Patching a NPM package locally with patch-package, not working

I'm working on a vue.js frontend, and I need to patch a package to fit the special needs of the app. The package I'm trying to patch is 'vue-youtube' (not that

Getting error while bundling Vue app with rollup js. CreateElementVNode

Basically, I am building VS code extension using Vue js but bundling the app using rollupjs gives an error. Node version - 14.18.0 Vue Js Version - 2.6.14 Rollu

Problem to use VueI18n outside a component

I'm trying to use i18n outside a component I've found this solution https://github.com/dkfbasel/vuex-i18n/issues/16 telling to use Vue.i18n.translate('str'), bu

NuxtJs app returns 401 after log in with laravel sanctum

I'm trying to build a PWA with NuxtJS and Laravel is in the backend for the API. I use Laravel Sanctum for API auth and also I have NuxtJS auth module, I can lo

How to make vue3 import async dynamic component work?

I am a beginner using vue3. We can use dynamic component like this: <script setup> import CommonLayout from "@/components/Layout/CommonLayout.vue"; </s

Quasar: some fontawesome icons are not available

I use some fontawesome icons in a quasar project. I import them as specified in the quasar doc: Webfont icons are available through @quasar/extras package. You

Use Vue variable in style section of a component

Is it possible to use a variable with the style tag of a component? Basically I have imported a mixin to my style tag that accepts 2 colors to create a gradient

Nuxt & Vuetify: how to control the order in which CSS files are loaded?

In my Nuxt/Vuetify app I'm trying to load my custom CSS after Vuetify's CSS, but Vuetify's CSS gets loaded afterwards no matter what. I tried to reverse the ord

How to set a component non-reactive data in Vue 2?

I have a categories array, which is loaded once (in created hook) and then it is static all the time. I render these array values in a component template. <t

Vue 3 how to get information about $children

This my old code with VUE 2 in Tabs component: created() { this.tabs = this.$children; } Tabs: <Tabs> <Tab title="tab title"> .... <

How can I use async/await in the Vue 3.0 setup() function using Typescript

(This question has been answered for JavaScript, see below, but this question is specific for TypeScript, which behaves differently) I'm trying to use async fun

How to change Vuestic Admin theme favicon

How to change the favicon in the Vuestic Admin theme? I looked up the index.js file, but it did not specify the path of the favicon. page/public/favicon.ico p

How to wait for the middleware to finish before loading the page

I am on Vue2 and Nuxt. I want ended my requests in middleware before load page. How create that ? How can I wait for the end of my request before loading my pag

Error: Cannot find module '@vue/babel-preset-app'

When I create a new vue application, and I run the server I get an error, after the compilation failed. Does anyone have where the problem comes from? Here is

Error: Cannot find module '@vue/babel-preset-app'

When I create a new vue application, and I run the server I get an error, after the compilation failed. Does anyone have where the problem comes from? Here is