SHARE
TWEET

Untitled

a guest Jul 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <template>
  2.   <div>
  3.     <button @click="handleSubmit">
  4.       Click Me!
  5.     </button>
  6.     <div
  7.       class="message"
  8.       v-if="submitted"
  9.     >
  10.       Hello Stranger.
  11.     </div>
  12.   </div>
  13. </template>
  14.  
  15. <script>
  16.   export default {
  17.     name: "GreetingButton",
  18.  
  19.     data() {
  20.       return {
  21.         submitted: false
  22.       }
  23.     },
  24.  
  25.     methods: {
  26.       handleSubmit() {
  27.         this.submitted = true
  28.       }
  29.     }
  30.   }
  31. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top