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
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
85 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
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
4 votes
1 answer
3k views

Is there any problem if I use two onMounted() per one component?

I have only seen examples of one onMounted() per one component. I'd like to use onMounted() for each feature. Is there any problem? MyComponent.vue <script setup> import { onMounted } from 'vue';...
decoy's user avatar
  • 171
1 vote
4 answers
4k views

Why doesn't the component tag in Vue3 work properly for dynamically rendering components?

I'm just learning Vue and trying to learn dynamic rendering using the component tag. What is the problem with this code? No errors are displayed in the console, but clicking on the buttons still does ...
mrcrazyog's user avatar
3 votes
2 answers
5k views

How to clear "Slot 'default' invoked outside of the render function" warning? Vue3, Composition API

The full warning message: [Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render ...
Cin88's user avatar
  • 513
0 votes
1 answer
494 views

Why is my bound data in a Vue 3 form not being updated when printed on the console via a function?

I have created a form component in Vue 3 where I am trying to bind a reference object to input elements and from my understanding of two-way binding and how Vue behaved for my past works, I expected ...
Muhtasim Fuad Showmik's user avatar

15 30 50 per page
1
2 3 4 5
7