Merge pull request #199 from richex-cn/fix-time-comp-update
fix Time component can't update when time prop updated.
This commit is contained in:
commit
8cc6726e2c
2 changed files with 17 additions and 1 deletions
|
@ -49,6 +49,12 @@
|
|||
];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
time () {
|
||||
// https://segmentfault.com/q/1010000021110866
|
||||
if (!isServer) this.setTime();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
if (this.hash !== '') window.location.hash = this.hash;
|
||||
|
@ -96,4 +102,4 @@
|
|||
if (this.timer) clearInterval(this.timer);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue