All Questions
33 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 ...
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 ...
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
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 ...
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 ...
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,...
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 ...
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>...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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('...