Questions tagged [v-model]

Use this tag for questions related to the v-model directive of Vue.js.

The v-model directive is used to create two-way data bindings on form input, textarea, and select elements. It automatically picks the correct way to update the element based on the input type. Although a bit magical, v-model is essentially syntax sugar for updating data on user input events. For more information: https://vuejs.org/v2/guide/forms.html#Modifiers

420 questions
0
votes
1 answer

Declare a parent model on container

Is there any way of making this work? Javascript: const vm = new Vue({ el: "#app", data: { invoice: { title: "test" } } }) Pug: #app // This works h2 {{ invoice.title }} input(v-model="invoice.title") // This is the…
Solander
  • 327
  • 1
  • 2
  • 7
0
votes
1 answer

Vue2 dynamic v-model for a group

I am working on a housing form and I am stuck somewhere and I am hoping someone give me a solution to my problem. So, when you select in a form that your house have 2 floors, then you get to write each floor how many rooms, toilets, balcony etc…
Marketingexpert
  • 1,421
  • 4
  • 21
  • 34
0
votes
3 answers

Vue model is not working and doesn't perform the function

This is my form file and it includes the VUE input-field, I want to only show that field only when I checked that option Manually set new password. That is the last field where the issue is present. var app = new Vue({ el:…
Muhammad Hamza
  • 213
  • 1
  • 4
  • 14
0
votes
1 answer

Right way to transfer parent component's data to the child one (Element UI, Vue.js)?

I'm using Element UI, there is an el-switch component (like checkbox) and I don't understand how I can use it inside other components (el-table -> el-column -> el-switch). Here's the code: var Main = { data() { return { tableData:…
mcmimik
  • 1,389
  • 15
  • 32
-1
votes
1 answer

Vue 3 modal is always open when I use v-model

I want to implement common modal function using 'v-model'. My codes are like this below: Actually, the function does work(it shows alert messages) but dialogs which have 'v-model' pop up continuosly even they are 'false'. Please help…
-1
votes
1 answer

Creating input tag as v-model's length

Qasem Salehy
  • 165
  • 2
  • 2
  • 10
-1
votes
1 answer

dynamically show and hide button according to computed property in vuejs

i want to show delete button for each comment that a particular user made, but i am unable to do it, i am using v-bind to disable delete buttton for others comment, so that user cant delete others comment, but its still visible for all the comments…
ZaihamM Code
  • 87
  • 4
  • 12
-2
votes
1 answer

software development, v-model through examples, step by step?

I'm currently studying software development. I would like to understand the V-model, but I can't find an example anywhere that describes its process step by step. Could you help me? I would need a specific example with details about the development…
web216
  • 75
  • 4
-2
votes
2 answers

how can i use v-for loop in my vuejs project

I have a loop and I have 4 inputs in this loop. I want to give the id values from each loop separately to my 4 inputs, how do I do that? enter image description here enter image description here i am running a loop there is only one input this input…
-2
votes
2 answers

using the v-modeled data in two variable in vue

I v-model a data in my vue html to validate it in my form , but i also want to use it in other variable too this is my html
-2
votes
1 answer

How to use v-model property of vuejs with laravel blade file?

I am using vuejs cdn in my laravel blade file. Now, I want to bind v-model on my html input fields like text and select tag. here is my code how i am trying to use v-model on select tag. This process isn't working for me. thanks in…
-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
1 2 3
27
28