Created
March 7, 2016 19:41
-
-
Save iheartkode/7531ebdf2cd79f3a10df to your computer and use it in GitHub Desktop.
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> | |
<div> | |
<button @click="newWorkoutButton">New Workout</button><br><br> | |
<div id="workout-form" v-if="newWorkout"> | |
<h2>New Workout</h2> | |
<input type="text" placeholder="Area you worked out." v-model="areaWorkedOut"><br> | |
<input type="text" placeholder="Workout length in minutes" v-model="workoutLength"><br> | |
<input type="text" placeholder="Current mood, eg: lazy, tired etc." v-model="workoutMood"/><br> | |
<textarea name="textarea" rows="5" cols="25" placeholder="Notes" v-model="notes"></textarea><br><br> | |
<button @click="createWorkout">Submit</button> | |
</div> | |
</div> | |
</template> | |
<script> | |
import Vue from 'vue'; | |
const NewWorkout = Vue.extend ({ | |
data () { | |
return { | |
newWorkout: false | |
} | |
}, | |
methods: { | |
newWorkoutButton() { | |
this.newWorkout = true; | |
}, | |
createWorkout() { | |
newWorkoutData = { | |
} | |
} | |
} | |
}); | |
export default NewWorkout; | |
</script> | |
<style> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment