Skip to main content

All Questions

1 vote
0 answers
75 views

How to stop executing rest of code in script setup syntax in composition api Vue 3

I have a page template that contains the following sub-component: <template> <ManageVacanciesAndMatchesTabVacancies @loading-data="setIsTabDataLoading" /> </template> And ...
Dennis's user avatar
  • 3,730
4 votes
1 answer
2k views

why do I get this error when I try to use multiple defineModels in vue.js?

I am trying to use the v-model directive on two input elements. However, I am getting the following error: duplicate model name "modelValue". Below I show the code that generates this error: ...
William Pineda MHA's user avatar
1 vote
1 answer
48 views

Component isn't updating from computed value [duplicate]

I have a generic component linked to a computed value to simulate routing. There is a current page property, and three links, whenever the user clicks on a link, that property gets updated via the ...
dhiaagr's user avatar
  • 15
7 votes
1 answer
11k views

How to use defineModel (in Vue 3.4) for uses other than inputs

The examples given for defineModel in the Vue docs all relate to uses for data inputs. I was wondering if this construct could also be used elsewhere, thus avoiding the somewhat cumbersome props/emit ...
quilkin's user avatar
  • 1,457
0 votes
1 answer
4k views

Vue watchers and reactivity

In my vue app, I want to watch route changes, and then react to the change. Here is an example where I simulate a route change. <script setup> import { ref, watch } from 'vue' import { ...
Arti-Art's user avatar
0 votes
1 answer
30 views

VueJS passing parameter to bound property

I want to track the state of several buttons without having a tracker variable and function for each. So I want to pass a parameter through to a computed property, something like this: <div class=&...
Andy's user avatar
  • 2,150
-1 votes
1 answer
84 views

Blank background-image in vue.js

For a website, i want 70% of the page to be covered with an image. However the image is just blank. I use Vue.js as my frontend. Here is the code that results in a blank space: <script setup lang=&...
Clyon97's user avatar
  • 59
2 votes
1 answer
495 views

How to make vue testing library recognize script setup?

So I have an existing project where I wanted to add testing suite with jest + vue testing library. Added necessary libs and configs and jest basic calc sum test passes. After that importing basic vue ...
Perp's user avatar
  • 403
0 votes
1 answer
983 views

Is there a way to pass a Object as param to router in VueJS 3 (Composition API + script setup)?

In this project, there's the user which is a js object, like this: const user = { "ID": id, "NAME": name, "EMAIL": email, ... } And here's the router on VueJS: { ...
user avatar
1 vote
0 answers
958 views

Using TipTap with Vue3+Composition API+TS

I'm using TipTap with Vue3, Composition API and typescript (script setup) and I've faced a problem. There is no documentation how to implement https://tiptap.dev/examples/interactivity vue ...
Stepan Berkunov's user avatar
2 votes
1 answer
2k views

Vue 3 Component losing reactivity

I've been learning Vue 3 for the past month or so and have gotten quite far but I can't fix this no matter what I've tried. I know I'm losing reactivity but I can't figure out how and it's driving me ...
Todd Hammer's user avatar
0 votes
1 answer
725 views

How can I use a custom name for a vue component?

The component I want to use with a custom name is defined as: @/components/MyCustomName.vue <template lang=""> <div>I'm here</div> </template> <script> ...
Eric G's user avatar
  • 772
1 vote
1 answer
680 views

Why some variables are inacessible in onMounted Lifecyle Hook in vue3 composition API?

I'm kinda new to composition API in vue3 and I'll be glad if someone could explain to me why... this works: <template> <h1>{{ foo }}</h1> </template> <script setup> ...
Douglas Jordão's user avatar
1 vote
0 answers
344 views

How to use jest.spyOn in wrapper.vm function?

I'm using vue-test-utils to test my components. They are written in composition API with <script setup> tag. I'm facing some difficulties when spying the functions to test if they were called or ...
Gabriella Tavares's user avatar
0 votes
1 answer
498 views

How to load a dynamic image from a url in Nuxt3?

I have a nuxt 3 component which fails to load dynamic image that i'm getting from a specific URL(auth0 images). My template looks like so: <template> <img class="h-28 w-28 rounded-...
George Marwanqana's user avatar

15 30 50 per page
1
2 3 4 5
8