Created
March 16, 2019 10:01
-
-
Save mfaridzia/cd21ebca61b95e6c7cea4e681da3b304 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
<template> | |
<div> | |
<h1 class="title"> {{ title }} </h1> | |
<input type="text" class="name" v-model="name"> | |
<button class="submit" @click="submit"> Sumbit </button> | |
<p class="success" v-if="sumbited"> Thank You {{ name }} </p> | |
<h2 v-if="isFulana"> Ente Fulana Euy! </h2> | |
<h2 v-else> Bukan Fulana Ente Nih! </h2> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
isFulana: { | |
type: Boolean, | |
default: false | |
} | |
}, | |
data() { | |
return { | |
title: 'Input Data', | |
name: '', | |
sumbited: false, | |
} | |
}, | |
methods: { | |
submit() { | |
this.sumbited = true | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment