aboutsummaryrefslogtreecommitdiff
path: root/src/components/timeago/timeago.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/timeago/timeago.vue')
-rw-r--r--src/components/timeago/timeago.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/timeago/timeago.vue b/src/components/timeago/timeago.vue
index 2b487dfd..fce9605b 100644
--- a/src/components/timeago/timeago.vue
+++ b/src/components/timeago/timeago.vue
@@ -34,6 +34,13 @@ export default {
unmounted () {
clearTimeout(this.interval)
},
+ watch: {
+ time (newVal, oldVal) {
+ if (oldVal !== newVal) {
+ this.refreshRelativeTimeObject()
+ }
+ }
+ },
methods: {
refreshRelativeTimeObject () {
const nowThreshold = typeof this.nowThreshold === 'number' ? this.nowThreshold : 1