implement for loop
This commit is contained in:
parent
2756418cec
commit
ebcf9ccbef
|
@ -22,4 +22,4 @@ const app = Vue.createApp({
|
||||||
methods: {},
|
methods: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
app.mount("app");
|
app.mount("#app");
|
||||||
|
|
|
@ -17,20 +17,12 @@
|
||||||
</header>
|
</header>
|
||||||
<section id="app">
|
<section id="app">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li v-for="friend in friends">
|
||||||
<h2>Manuel Lorenz</h2>
|
<h2>{{ friend.name }}</h2>
|
||||||
<button>Show Details</button>
|
<button>Show Details</button>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Phone:</strong> 01234 5678 991</li>
|
<li><strong>Phone:</strong> {{ friend.phone }}</li>
|
||||||
<li><strong>Email:</strong> manuel@localhost.com</li>
|
<li><strong>Email:</strong> {{ friend.email }}</li>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2>Julie Jones</h2>
|
|
||||||
<button>Show Details</button>
|
|
||||||
<ul>
|
|
||||||
<li><strong>Phone:</strong> 09876 543 221</li>
|
|
||||||
<li><strong>Email:</strong> julie@localhost.com</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Reference in New Issue