Created
November 18, 2018 02:04
-
-
Save rajatk16/1033ff0077c1ad3db3f3f126acb32eff 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> | |
<button class="button logout" v-on:click="logout">Logout</button> | |
<article class="covers" v-for="(comic, idx) in comics" :key="idx"> | |
<div> | |
<img style="margin: 10px" :src="comic.image" height="291px" width="192px"> | |
<p >{{ comic.name }}</p> | |
<hr> | |
<button class="button" @click="deleteComic(comic.id)"> | |
Delete | |
</button> | |
</div> | |
</article> | |
<form @submit="addComic(name, image)"> | |
<h2>Add a New Comic Cover</h2> | |
<input v-model="name" placeholder="Comic Name" class="input" required> | |
<input v-model="image" placeholder="Comic Image URL" class="input" required> | |
<button type="submit" class="button">Add New Comic</button> | |
</form> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment