Skip to main content

All Questions

1 vote
0 answers
496 views

How do I center v-menu on the selected item? (Vuetify, Vue2)

I have a long list of selectable items using v-menu. I want to center the list on the selected item using v-list-item-group. However when using the the prop "auto" on v-menu adjusting the ...
Lissi's user avatar
  • 11
0 votes
1 answer
791 views

How do I properly use Nuxt emit?

I am trying to develop vue.js application, but recently faced a problem using emit function. The thing is that event successfully sends at child component, but it never appears at parent component. ...
SYKO's user avatar
  • 71
3 votes
1 answer
972 views

jest spyOn vue 2 composition api method

I'm using the composition API in vue2, and trying to write a unit test that spys on a function to make sure another function has called it, but the test fails saying that my spy hasn't been called. ...
Sam Willis's user avatar
  • 4,211
-1 votes
2 answers
4k views

vuejs 2 composition api: TypeError: Cannot read properties of undefined (reading 'length')

hello vuejs user community I'm stuck with a problem that can't be fixed: currently i am using vuejs 2.x, and my operating system is windows 11. after yarn install or npm install this source consle ...
Pham Minh Tuan's user avatar
1 vote
1 answer
4k views

Having promise response inside Vue template interpolation

I'm using Vue 2 and the composition API. My current component receives a prop from a parent and I render different data based on it, on the screen - the prop is called "result" and is of ...
Andra 's user avatar
  • 13
0 votes
1 answer
517 views

VueJS computed is returning false when the logic is true

I'm stuck on a project vue2 with composition API, where my computed function is returning the wrong value. <template> <line-component v-if="displayLine"> </line-component> &...
Romain BOBOE's user avatar
0 votes
2 answers
716 views

Vue JS - variable from javascript module is not reactive

I created a small module as a validator inspired from vee-validate and I would like to use this in conjunction with the composition api. I have a list of errorMessages that are stored in a reactive ...
thelandog's user avatar
  • 734
3 votes
0 answers
1k views

Rollup: VueJS composition api - Ref is not defined

I'm trying to use the composition api in a vue 2 module. When I initially created the npm module in the options api, I haven't experienced any issues and the module was installed and utilised ...
thelandog's user avatar
  • 734
1 vote
0 answers
1k views

Make shared property reactive in Vue Composition API composable by declaring variable outside of exported function

I am using the composition api plugin for vue2 (https://github.com/vuejs/composition-api) to reuse composables in my app. I have two components that reuse my modalTrigger.js composable, where I'd like ...
Merc's user avatar
  • 4,590
2 votes
1 answer
2k views

How to reference data from other data in Vue 3

I have an array [] stored as a constant in Vue 3 setup() method. The array is composed of X objects and is part of the responses of a form. I want to display each object in a single dynamic page for ...
Miguel's user avatar
  • 57
4 votes
1 answer
2k views

Vue not reacting to a computed props change

I am using the Vue composition API in one of my components and am having some trouble getting a component to show the correct rendered value from a computed prop change. It seems that if I feed the ...
benjimarshal22's user avatar
3 votes
2 answers
4k views

How to use $axios Nuxt module inside of setup() from composition API?

The docs say to use this.$axios.$get() inside of methods/mounted/etc, but that throws TypeError: _this is undefined when called inside of setup(). Is $axios compatible with the composition API? To ...
Mrweiner's user avatar
  • 521
0 votes
1 answer
529 views

Vue JS - Using both Vue 2 and Vue 3 in a project

I'm trying to utilise a function defined in a JS class component. In order to use the said function in composition api I would the following: setup(props) { const {errorMessages, handleInput, ...
thelandog's user avatar
  • 734
0 votes
1 answer
2k views

Reactive Vue Router object by wrapping in ref() not working

I have an application where I would like to print the location of the user similar to a breadcrumb. I have a component that I add at the application level and expect it to update with current value or ...
Jmh2013's user avatar
  • 2,777
5 votes
2 answers
2k views

Vue Composition Reactive properties are not updating in components

I'm building out a notification system and it's sorta working, but sorta not. I have the follow Composition function const data = reactive({ notifications: [] }); let notificationKey = 0; export ...
LeeR's user avatar
  • 1,634

15 30 50 per page