add v-if to the contact details
This commit is contained in:
parent
6d281326bc
commit
1c6769e900
|
@ -19,8 +19,8 @@
|
|||
<ul>
|
||||
<li v-for="friend in friends">
|
||||
<h2>{{ friend.name }}</h2>
|
||||
<button>Show Details</button>
|
||||
<ul>
|
||||
<button @click="toggleDetails()">Show Details</button>
|
||||
<ul v-if="detailsAreVisible">
|
||||
<li><strong>Phone:</strong> {{ friend.phone }}</li>
|
||||
<li><strong>Email:</strong> {{ friend.email }}</li>
|
||||
</ul>
|
||||
|
|
Reference in New Issue