perf(client): use shallowRef as possible
This commit is contained in:
parent
cb35ace047
commit
c4830dcf3a
2 changed files with 6 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ const props = withDefaults(defineProps<{
|
|||
const _time = typeof props.time === 'string' ? new Date(props.time) : props.time;
|
||||
const absolute = _time.toLocaleString();
|
||||
|
||||
let now = $ref(new Date());
|
||||
let now = $shallowRef(new Date());
|
||||
const relative = $computed(() => {
|
||||
const ago = (now.getTime() - _time.getTime()) / 1000/*ms*/;
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue