All Questions
Tagged with vue-composition-api javascript
442 questions
0
votes
1
answer
92
views
How do I make my ApexCharts reactive with data in Pinia Store using Vue.js 3 and composition API?
I am building a dashboard using Vue.js 3 and ApexCharts with the composition API. The data for the charts is held in a Pinia data store.
I have a function that pulls data from a sample .json file (...
1
vote
1
answer
43
views
vuejs unexpected content behavior when changing array of child components with slots
I want to make a custom carousel which displays multiple slides at once and moves by one slide on a button press. In the main view this is how it is defined:
<MultiItemCarouselComponent>
<...
1
vote
2
answers
53
views
How can I render components dynamically with Vue 3?
I have a process which have many steps. Each one is implemented in a different component.
Initially I had this code:
<template>
<template v-if="process.currentStep === 0">
&...
0
votes
0
answers
87
views
My local variable is not being changed with watch in Vue.js + primevue
I have a parent component and a child component. I created a local variable in the child component to copy the parent's variable and be able to change its value. The problem is that in some ...
0
votes
0
answers
125
views
How to deal with <script-setup> component imports and eslint rules like no-unused-vars
When using Vue
composition API with <script setup>, components are just imported like
import Component from '@/components/Component.vue';
How do I keep eslint from applying the no-unused-var ...
0
votes
0
answers
605
views
Vue component error handling with onErrorCaptured
We have specific components that have to be handled specially in regard to error logging. We are using Sentry and need to apply specific tags to possible errors when they are thrown in a specific ...
-1
votes
2
answers
418
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 ...
0
votes
0
answers
303
views
Quasar table header selection value always true
I'm working with vuejs and quasar and I find something. In this component Im using quasar table with multiple selection The header selection is not working as expected. I'm trying to exclude rows with ...
2
votes
1
answer
280
views
How to acces data and methods from defineExpose in vue
`I am trying to access the method from the child component to the parent component in Vue(composition api) , I have defined the method inside the defineExpose , but not able to access it within parent
...
0
votes
1
answer
54
views
How can a container change the CSS display property of a child in the default slots?
I have a vue playground.
The container component needs to be able to control the CSS display property of an unknown number of children in the default slot.
I assume the child components will need to ...
0
votes
1
answer
124
views
How can I call an exposed function of a vue component in a default slot?
I have a vue playground.
ChildA and ChildB both expose a function called interfaceFunction.
I can call this function from App by getting a reference to the component. With the reference, I can call ...
2
votes
1
answer
109
views
How can a container change the display of a child in the default slots?
I have a vue playground.
The container component needs to be able to control the display status of an unknown number of children in the default slot.
I assume the child components will need to hold a ...
-1
votes
1
answer
42
views
Vue3 poor man's store
So I am trying to use vue's composition api to create a simple store, but whatever I do, it doesn't work right for some reason.
in store.mjs I have very simple code:
export const testString = ref(&...
1
vote
2
answers
82
views
Vue computed prop change not being reflected in component if value references same object
example store:
const trigger = ref(true);
const prop = computed(() => {
trigger.value;
console.log('comp prop run'); // works!
return some_big_object;
});
const doChange = () => {
...
3
votes
2
answers
573
views
How to expose @click event handler on a slot to parent so the parent can bind it to an element passed to that slot with v-bind like in Vuetify?
First things first I use the <script setup> API.
In Vuetify components like v-menu have a slot called activator where you can put a custom element as your dropdown "button" and bind ...