Skip to main content

All Questions

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 ...
Camille Greselle's user avatar
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 ...
Mike Bee's user avatar
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) ...
CaptainCrasi's user avatar
2 votes
3 answers
544 views

Why is reactive variable changing when it is not assigned to v-model

I'm fairly new to the composition API but it's been somewhat straight forward so far. I'm making an Axios call that is returning some data; const transaction = ref({}); let pbl = reactive({}); const ...
Dally's user avatar
  • 1,477
1 vote
1 answer
1k views

Mixing Vue Composables with Class Based Components

I'm attempting to mix composables into a class based component setup, as part of a slow migration from Vue 2 to Vue 3. However, I am struggling to referenced return values from the setup function ...
Micheal J. Roberts's user avatar
2 votes
0 answers
313 views

Primitive array validation with vuelidate

I'm using vuelidate 2.0 to validate a form. I'm trying to validate a primitive array, and I can't find a way to do it. When using helpers.forEach({ required }) it works perfectly with array of objects,...
Aviv Day's user avatar
  • 438
1 vote
0 answers
123 views

How to use Vue3 like readonly on Vue2

I'm using Nuxt2 and '@nuxtjs/composition-api'. This '@nuxtjs/composition-api' has readonly() function, however this not behave like Vue3 readonly When you use '@nuxtjs/composition-api' readonly, you ...
harunaga's user avatar
  • 385
3 votes
2 answers
1k views

vue2.7 v-if not working with script setup, does vue2.7 above not support this syntax?

<template> <div> <button @click="handleClick">toggle</button> <span v-if="isToggled()"> hidden message </span> </div>...
FE Beginner's user avatar
0 votes
1 answer
121 views

What should be order of life cycles, variables, functions Nuxt Composition API?

I am frontend team member and we are creating web pages together by using Nuxt Composition Api. We want to write clean and well ordered codes together and we don't wanna face with much problems when ...
oktay tontaş's user avatar
11 votes
4 answers
9k views

Migrating from vue2 with property-decorator and class style syntax to vue3

I maintain quite a large vue2 project, which among other libraries makes use of Vuetify, vue-class-component, vue-property-decorator and typescript. Example component: (The component is simplified ...
Farsen's user avatar
  • 1,697
0 votes
1 answer
425 views

Vue2 Composition Api - How do I fetch data from api?

I am using Vue2.6 with composition api. I need to reroute to different pages depends on an api response. Can someone please guide me, please? I tried using onBeforeMount but it renders the UI elements ...
shin616122's user avatar
1 vote
1 answer
3k views

How to save local values from inside onMounted hook - Vue 3

how do I save assigned values from inside onMounted hook in Vue 3? My intention of saving the width and height values is so that can use to manipulate the values inside a custom-directive outside of ...
liner183's user avatar
0 votes
0 answers
2k views

Vue - Composable and emit - Passing function from parent to grandchild

I am new to Vue and I have recently started to use Composition api. I understand that emit in Option Api but I am not really sure what is the benefit in Composition Api... For example, in OptionApi: ...
shin616122's user avatar
0 votes
0 answers
485 views

How to use Nuxt-child in nuxtjs?

I want to use nuxt-child in my project. Because I don't wanna refresh page whenever a link was clicked on right area. Normally I used nuxt-child in many projects without any mistake, but in this ...
oktay tontaş's user avatar
0 votes
1 answer
554 views

How to get state in Nuxt js with composition api?

setup(){ const columns = computed(()=>store.state['subCategory'].subCategoryColumnsData[subCategoryName.value]); const { fetch } = useFetch(async () => { await store.dispatch('...
oktay tontaş's user avatar

15 30 50 per page