Questions tagged [vue-data]
12 questions
2
votes
2 answers
Vue.js - How to emit to parent component on change in data object?
The use of v-model creates a two-way bind between the view and data model WITHIN a component. And a view interaction can emit an event to a parent component.
It is possible, though, to have a data model change in a child component emit an event to a…

Spectator6
- 363
- 1
- 5
- 19
1
vote
1 answer
On state change, do animation
Currently I'm working in Vue.js and have a navigation menu that I'd like to animate. What I'm looking to do is show two li elements when a user hovers over one of the navigational buttons.
Currently what I'm doing is setting a data type of…

albert_anthony6
- 594
- 2
- 9
- 30
1
vote
0 answers
Vue data function returns values but vue ignores them
Can anyone please tell me why vue is ignoring my data function return values? text, userId, and videoId. Sometimes it doesn't ignore them and a lot of times it does out of nowhere and I'm not sure why. Here is my code. What I get in chrome vue…

albert_anthony6
- 594
- 2
- 9
- 30
0
votes
1 answer
How to access data properties in Vue 2 in script tag
I have defined a variable isShowDrop2
var app = new Vue({
el: '#vueapp',
data: {
isShowDrop1: false,
isShowDrop2: false,
},
methods: {
drop_hide() {
if (isShowDrop2 == false) {
…

user43436
- 31
- 3
0
votes
1 answer
Data from props not showing in v-model (VueJS)
I'm trying to use a props from the parent component to use it as a data in my child component.
parent component :
And child component (ChangeCommentModal) :
props: ['comment'],
data() {
…

Arnaud
- 15
- 4
0
votes
2 answers
Vue Ionic template logic getting null data objects when data assigned inside async method
UPDATE
Solution found, but I don't understand the reason. any explanation, please.
ORIGINAL QUESTION
I have a Vue / Ionic project which is giving me hell.
I'm trying to use the following code, but problems starts when I try to assing a value to some…

Fahed
- 195
- 2
- 10
0
votes
1 answer
How to change input value for individual object in an array using v-for in Vue?
I'm making a shopping cart. I want to show the price of each product based on their quantity.
I made the buttons to add or subtract the quantity of products. However the quantity changes in all products because they all share the same data. How can…

William Chou
- 3
- 2
0
votes
2 answers
Vue - Unable pass specific value to higher component
I am getting the following - Cannot read property 'free' of undefined.
I will be adding this button component on multiple pages and I have data object which will allow me to add text based on whatever page I want displayed on a page. For example if…

Rejaur Rahman
- 29
- 5
0
votes
1 answer
vue-router params undefined on create()
I'm grabbing a param from my vue-router and I get this error when trying to store the params data into my components data
Error in created hook: "TypeError: Cannot read property 'params' of undefined"
here is where I am sending the data from…

monsterpiece
- 739
- 2
- 12
- 34
0
votes
1 answer
push object to array of arrays vue re-rendering failing
I have this weird issue where I can't seem to push an object to an array of arrays.
I am able to log the value of groups....but I can't update it.
here's my function to push to the groups array under a given set of conditions
calcExclusion:…

monsterpiece
- 739
- 2
- 12
- 34
0
votes
1 answer
VueJS reusable component not updated data for second component
I am trying to create one component in VueJS and need to reuse that component.
below is code for me.
Vue.component("radio" , {
props: ['selectGender'],
data: function() {
return{
selected: 1
}
},
template : `

AB Vyas
- 2,349
- 6
- 26
- 43
-2
votes
2 answers
How to initialize Vue data() using html input element value
I am trying to initialize Vue data() with a value in rendered input tag.
I know it is possible to make input tag value to get data from data() using v-model="[data-key-here]" in Vue. Is there any way to initialize data in data() using data that is a…

Valentine Sean
- 79
- 3
- 13