Skip to content

Instantly share code, notes, and snippets.

@alrayyes
Created August 25, 2020 14:44
Show Gist options
  • Save alrayyes/96059422431e993c77b308031cb532ae to your computer and use it in GitHub Desktop.
Save alrayyes/96059422431e993c77b308031cb532ae to your computer and use it in GitHub Desktop.
Hello World
<!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> -->
<template>
<div id="app">
<h1>{{message}}</h1>
<p>
Learn more with the
<a
href="https://vuejs.org/"
target="_blank"
rel="noopener"
>Vue Docs &amp; Resources</a>.
</p>
<button @click="doSomething">Say hello.</button>
</div>
</template>
<script>
export default {
data() {
return {
message: 'Welcome to Vue!'
};
},
methods: {
doSomething() {
alert('Hello!');
}
}
};
</script>
<!-- Use preprocessors via the lang attribute! e.g. <style lang="scss"> -->
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
a,
button {
color: #4fc08d;
}
button {
background: none;
border: solid 1px;
border-radius: 2em;
font: inherit;
padding: 0.75em 2em;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment