Skip to content

Instantly share code, notes, and snippets.

@rajatk16
Created November 18, 2018 02:04
Show Gist options
  • Save rajatk16/1033ff0077c1ad3db3f3f126acb32eff to your computer and use it in GitHub Desktop.
Save rajatk16/1033ff0077c1ad3db3f3f126acb32eff to your computer and use it in GitHub Desktop.
<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