All Questions
20 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 ...
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.
...
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. ...
-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 ...
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 ...
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>
&...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...