-
-
Save Maxobat/d5319738b3ca22538778ff6849ab0478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
export default Vue.component('test-component', { | |
template: ` | |
<div> | |
<h1>{{ heading }}</h1> | |
<ul> | |
<li v-for="item in listItems" v-if="item !== 'Not visible'" :key="item"> | |
{{ item }} | |
</li> | |
</ul> | |
<p>More content</p> | |
</div> | |
`, | |
data: () => ({ | |
heading: 'This is the heading', | |
listItems: [ | |
'First', | |
'Not visible', | |
'Third', | |
], | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment