All Questions
Tagged with vue-composition-api vuejs2
135 questions
1
vote
1
answer
78
views
Computed property lack of reactivity for deep nested object
EDIT01: I'm using "nuxt": "^2.16.0" with "@nuxtjs/composition-api": "^0.29.2".
I'm have been trying for days to figure this out but still dealing with this ...
1
vote
1
answer
77
views
What is 'effect' on Vue computed properties
If I inspect a computed property in Vue 2.7, I can see that, besides the well-known .value property, there's also .effect. I wasn't able to find any information about it, except that it's deprecated ...
1
vote
0
answers
739
views
Issue with Vue3 upgrade and @vue-compat (mixing Composition and Option API)
I'm currently updating a legacy Vue 2.6 app to Vue 3.4, I followed the migration build and its instructions but I'm currently stuck with one component .
Indeed I decided to refactor My UiMediaUploader ...
3
votes
0
answers
119
views
pinia composition api 'this' type problem
I am using Nuxt 2 with Pinia Composition API. Through a plugin, I have added axios instances, etc., into PiniaCustomProperties.
const piniaPlugin = ({ $pinia, app }: { $pinia: any; app: any }): void =&...
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 ...
1
vote
0
answers
1k
views
VueDemi not working when I try to import my vue 3 library in a vue 2.6 project
I'm trying to implement a library that can run both Vue 2 and Vue 3 using VueDemi
After I followed the documentation, my library is not working in a Vue 2.6 project. I'm not receving any error or ...
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 ...
1
vote
0
answers
324
views
Vue 2.7 Array of objects losing reactivity when modified
I've recently managed to upgrade our codebase to Vue 2.7 in the hopes of being able to start using the CompAPI, but I'm having some issues with it.
The feature that I'm having an issue with is 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.
...
1
vote
0
answers
637
views
How do I watch an array index in a for loop in Vue 3
I have an array of objects
const myArray = ref([{0: '1'}, {1: '38'}, {2: '86'}, {4: '22'}])
And I want to add a watcher over every single index (because I want to retrieve that index for later logic) ...
2
votes
1
answer
964
views
Vue router in composition api?
In Nuxt 2.16, I'm trying to access the useRouter composable with import {useRouter} from 'vue-router', as in this question, but the import leaves useRouter undefined.
When I import * as r from 'vue-...
4
votes
1
answer
784
views
Can't use Vue 2.7 Composition API with WebPack Module Federation?
Hello to everyone here !
We have 2 apps on the exact same version (Vue 2.7.14) which allow us to use Composition API and <script setup> syntaxe in each of the apps.
We set up WebPack's ...
2
votes
1
answer
2k
views
Vue 2.7 Composition API plugin provide/inject
I am trying to create a vue 2.7 plugin that uses the provide/inject composition api features.
I seem to be able to use the provide/inject in their own projects but when using npm link it seems to all ...
2
votes
0
answers
226
views
"Cannot find name" of global instance property when using Composition API with TypeScript in Vue 2.7
I'm working on upgrading an old Vue project that uses TypeScript and the class component definition style. Having upgraded Vue to version 2.7.13 I'm trying to migrate components to the Composition API ...
1
vote
2
answers
595
views
How to export reactive Vuex state from setup in Vue2.7
Here's a reproduction link: https://stackblitz.com/edit/node-c6mn17?file=src/components/Test.vue
I want to be able to use reactive state from that store using setup in Vue 2.7.
I export a Vuex store ...