Last active
June 7, 2021 12:17
-
-
Save ryandejaegher/b3bf4fec59be3ab78bc2f28ac95284c9 to your computer and use it in GitHub Desktop.
header #vue
This file contains hidden or 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
<template lang="pug"> | |
<div> | |
p(@click="handler") {{ greeting }} World! | |
h1 Hello World | |
</div> | |
</template> | |
<script> | |
export default { | |
methods: { | |
handler() { | |
this.greet = !this.greet; | |
this.greet ? this.greeting = 'Hi' : this.greeting = "Hello"; | |
alert('clicked') | |
} | |
}, | |
data() { | |
return { | |
greet: true, | |
greeting: 'Hello' | |
} | |
} | |
} | |
</script> | |
<style> | |
body { | |
font-family: sans-serif; | |
} | |
</style> | |
This file contains hidden or 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
{ | |
"scripts": [], | |
"styles": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment