All Questions
Tagged with vue-component arrays
89 questions
0
votes
1
answer
121
views
Vue.js - Automatic update of v-for not working with assigning new array
I've been following this tutorial on vue3: Vue.js Tutorial: Beginner to Front-End Developer https://www.youtube.com/watch?v=1GNsWa_EZdw&t=48s
Everything seems to be working on my side too, except ...
0
votes
1
answer
103
views
Simple todo list in vue
i am learning vuejs and i'm building a small todo list app.
I can't pass the array though to the child component that takes care of displaying the list:
Parent component
<template>
<div ...
0
votes
1
answer
91
views
How to make this carousel unreliable on id assigned in props?
I've recently build a carousel with slots. But it has one issue. This component is based on the fact that id for each slide is defined as a prop, so code looks more complicated and I'm sure that there'...
1
vote
2
answers
71
views
Can we use vue splice inside foreach() to delete multiple elements?
I have a image grid(in array form),
There I am trying to add multi-deletion functionality.
So When checkbox of each image from grid is checked, I am maintaining an array named selectedImages with ...
-1
votes
1
answer
85
views
How to extract index from this string?
I'm studying how to create my own lightbox component in vue. I figured out how to do it, but I faced one issue. I don't know how to get an access to this index of the array.
<LightBox
:thumbnail=&...
1
vote
0
answers
3k
views
Update and delete an object within an array of a Pinia store in Vue
I am making a CRUD in Vue 3 and I am using Pinia to save my objects as an array. Everything works fine but already when I want to update one of the objects I get the error of:
[Vue warn] Set ...
0
votes
1
answer
134
views
Dynamically adding counter to v-data-table with two buttons to increment and decrement and the number between them
The problem here is I am getting data from an api and the data has no property like 'count' so I need to create another array and use it in v-for.
But I want to specify a number with the counter and ...
0
votes
1
answer
59
views
Vue.js item doesn't get deleted from array
I've been trying to figure out just why this isn't working and I must be missing something. I am using example code for inspiration but it doesn't seem to co-operate the same way as in the example, as ...
0
votes
0
answers
56
views
Calculate price of array services based on multiple onlick using vuejs
I have a problem as can be show on the picture balow.On the right I have a list of services which when clicked affects the final price of services on the right.
I have written a code unfortunately it ...
0
votes
1
answer
738
views
How to watch for change on a specific input in list of inputs in Vue 3
I am attempting to set up a vue 3 watcher that watches for changes to input fields in a v-for list. I set up an array of objects, each with a type. I want to add input to the field with the type "...
0
votes
2
answers
804
views
Simple List Rendering in Vue with finding Index and passing props
so I do the beginning todo list stuff. I have this array
state() {
return {
news: [
{
id: 1,
title: "Titel 1",
...
0
votes
1
answer
142
views
How to calculate Total Amount by Change Status Debit or Credit from array in components in Vue3 JS
I have one Amount column in my table and I want to calculate total debit, total credit, total remaining amount by chnage in status of dropdown debit and credit.
if dropdown selection is debit then &...
0
votes
1
answer
216
views
Cannot read properties of undefined (reading 'map') when trying to display two arrays
I have a component containing an array, which has certain categories and headers. I wanted to put these into a collapsible menu, but ran into trouble because since all the items are in a single array, ...
0
votes
1
answer
453
views
format currencies in a Vue component?
Good day everyone, I'm trying to format the value that JSON brings me in currency, I saw some suggestions but I still can't convert the value.
This is how I've my code structured
<template>
...
&...
1
vote
1
answer
470
views
How to use an external array in Vue JS
I've been trying to use an external array in my VueJs code, but I've been running into problems
Here's my code:
import iconsData from 'components/iconsData.js';
export default{
data(){
...