I am trying to use v-for to loop through data which included title and icons. Right now I can get only one icon by looping through, My question is how can I get more than one icon when looping through?
I have made a codepen: https://codepen.io/anon/pen/MMaGOZ?&editable=true&editors=101. So basically in this example how can I get more than one icon. So if I also want a search icon alongside dashboard.
<div id="app">
<v-app id="inspire">
<v-navigation-drawer
class="blue lighten-3"
dark
permanent
>
<v-list>
<v-list-tile
v-for="item in items"
:key="item.title"
@click=""
>
<v-list-tile-action>
<v-icon>{{ item.icon }}</v-icon>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title>{{ item.title }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-navigation-drawer>
new Vue({
el: '#app',
data () {
return {
items: [
{ title: 'Dashboard', icon: 'dashboard','search' },
{ title: 'Account', icon: 'account_box' },
{ title: 'Admin', icon: 'gavel' }
]
}
}
})
If I do icon: 'dashboard', 'search' => This gives me an error message. Not sure how can I get this?
Thanks in advance.
iconproperty to be of Array type, e.g.{ icon: [ 'dashboard', 'search' ] }