0👍
Your Template neet to be display so:
<div class="field" v-for="(m, index) in meta" :key="index">
<input :v-model="m" name="type" class="form-control shadow-btn" />
</div>
- [Vuejs]-Use axios request insde a for loop
- [Vuejs]-Input value that's binded with vue does not show up in the dom
0👍
Try this approach!
new Vue({
el:"#app",
data: {
meta:['Meta 1','Meta 2']
},
methods: {
addInput(){
alert("Do something!");
}
},
});
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<div class="field" v-for="(m, index) in meta" :key="index">
<input :value="m" name="type" class="form-control shadow-btn" />
</div>
<a href="javascript:void(0)" @click="addInput">add</a>
</div>
</body>
</html>
- [Vuejs]-Vue js – display an element from a list based on the current time
- [Vuejs]-How to generate new revision each build in vuejs?
Source:stackexchange.com