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,657
questions
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="...
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 :...
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: ...
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 ...
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>, ...
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 ...
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 (...
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 = ...
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 ...
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 ...
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',
...
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 ...
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, ...
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 ...
-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 ...