Implement retweet action
This commit is contained in:
parent
242ae8e91b
commit
11125abeeb
3 changed files with 13 additions and 1 deletions
|
@ -2,6 +2,9 @@ const RetweetButton = {
|
|||
props: [ 'status' ],
|
||||
methods: {
|
||||
retweet () {
|
||||
if (!this.status.repeated) {
|
||||
this.$store.dispatch('retweet', {id: this.status.id})
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<i :class='classes' class='icon-retweet fa' v-on:click.prevent=''></i>
|
||||
<i :class='classes' class='icon-retweet fa' v-on:click.prevent='retweet()'></i>
|
||||
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue