Created
December 7, 2021 00:01
-
-
Save ShariqT/4582a57f60761e9ab0f3adfdb4664c2f to your computer and use it in GitHub Desktop.
list-postcards4.vue
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> | |
<!-- other code --> | |
<ul> | |
<li v-for="postcard in postcards"> | |
<span v-if="postcard.from != null"> | |
From {{ postcard.from.name }} to {{ postcard.to.name }}. | |
</span> | |
<span v-else> | |
From *Address Missing* to {{ postcard.to.name }}. | |
</span> | |
<span | |
v-if="canCancel(postcard.send_date)" | |
@click="cancel(postcard.id)" | |
class="cancel">Cancel | |
</span> | |
</li> | |
</ul> | |
<!-- other code --> | |
</template> | |
<style> | |
.cancel { | |
cursor: pointer; | |
border: 1px solid red; | |
color: red; | |
border-radius: 10px; | |
padding: 6px; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment