Skip to main content

Questions tagged [vue-composition-api]

A set of additive, function-based APIs for VueJS that allow the flexible composition of component logic.

vue-composition-api
1 vote
1 answer
32 views

In Vue3 how to access a component's exposed bindings (via defineExpose) from a parent when the component was passed to a slot?

Lets say I have a Component.vue <template> <div> <div class="items"> <slot name="items"></slot> </div> <div class="...
FieryRider's user avatar
0 votes
0 answers
26 views

Pass Function from Parent to Child, where I can pass arguments also in Vue/Nuxt 3 Composition API [closed]

Pass function from Parent to Child, where I can pass arguments also in Vue/Nuxt 3 Composition API Parent Component </script setup> <template> <div> <ChildComponent :...
Syed Ashraf's user avatar
0 votes
1 answer
31 views

Vue 3, dynamic component with binding event and function

I have an array of form field like below and I wanna render dynamic form with event and function [...{ label: "Logo", field: "image", component: ...
Newbie Web's user avatar
0 votes
1 answer
36 views

Are there any issues/concerns with assigning computed values to a ref property in Vue?

I'm reviewing some Vue code where the developer has assigned a computed value to a ref property. I've never seen this done before, and although it works, it seems odd to me. Are there any potential ...
Josh's user avatar
  • 911
0 votes
1 answer
50 views

Computed is still dirty after getter evaluation, with dependency being set asyncronously

I have a pinia store which loads data on demand from a database (specifically Firestore, but I don't think it matters). When the data is queried, it sets a value into a reactive Map ({ id: <id>, ...
Alpvax's user avatar
  • 153
2 votes
2 answers
82 views

Vue 3 separation of logic with setup notation and composition API

In Vue 3 (composition API with setup method), in order to separate logic, you've to create other methods outside of your setup method (which are named composition functions) : <script> export ...
Nicolas's user avatar
  • 103
0 votes
1 answer
32 views

Handling form input fields with Vue Composition API and Pinia store, can all v-model variables be organized into a single object?

I am using Vue3 with the Composition API and Pinia. When building a form component with various input fields, I've been handling it like this example, where each input is assigned it's own variable (...
slim.mckins's user avatar
0 votes
2 answers
49 views

Pinia state loosing reactivity when used in an object?

Trying to wrap my head around reactivity when it comes to states from a Pinia store. I have the following store (@/stores/settings.js): import { defineStore } from 'pinia' export const useSettings = ...
s427's user avatar
  • 1,546
0 votes
1 answer
96 views

Properly mocking a composable function with vitest

In my Vue 3 app, I use the pattern of having a composable that contains methods that will handle fetching some data from various APIs. The reason they're composables rather than simple functions is ...
Sensanaty's user avatar
  • 1,036
0 votes
0 answers
20 views

LPolyline not updating with new data with Vue 3

I am making a map application using vue 3, quasar and vue-leaflet. I have gotten the map to render and I have markers able to be rendered and update the location when new data comes in. When I try to ...
Rijesh Augustine's user avatar
0 votes
0 answers
23 views

Tawk Messenger with Vue 3 : Set attributes in composition API

I am trying to setup the tawk widget with a Vue 3 project. The component and widget are correctly setup using this code on main.ts : app.use(TawkMessengerVue, { propertyId: 'correctWidget', ...
Chaibi Alaa's user avatar
  • 1,396
1 vote
1 answer
26 views

Computed property that relies on Vuex stored prop not updating?

When reservation is updated (which it is, I can see it change in the template through things like {{ reservation.id }}) the following computed property (reservationHashedId) is not... Why? const ...
Chuck Le Butt's user avatar
0 votes
0 answers
63 views

Vue 3 onMounted not loading data in Vuetify data table server

I have created this page with Vue 3 + Vuetify called demo.vue in my project which receives data from an API server. The problem that I'm facing is that I set up the data inside an onMounted function, ...
Antonio's user avatar
1 vote
0 answers
57 views

Swiper Laravel 9 VueJs 3

I'm trying to do a swiper using laravel api vue js composition api, the swiper doesn't work, it was working at first with the template(statically using the swiper code in main.js), but when I added ...
MERAH Samia's user avatar
-1 votes
2 answers
125 views

Vue js 3 search component feature

I want to create a search component with result dropdown in vue js using composition api. The component should follow the next requirements: Clicking on the input a request should occur, loading ...
Asking's user avatar
  • 3,998

15 30 50 per page
1
2 3 4 5
111