tweak confetti
This commit is contained in:
parent
70805e00eb
commit
4b181a30da
2 changed files with 4 additions and 2 deletions
|
@ -188,7 +188,9 @@ onMounted(() => {
|
|||
const bm = parseInt(props.user.birthday.split('-')[1]);
|
||||
const bd = parseInt(props.user.birthday.split('-')[2]);
|
||||
if (m === bm && d === bd) {
|
||||
confetti();
|
||||
confetti({
|
||||
duration: 1000 * 4
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import _confetti from 'canvas-confetti';
|
|||
import * as os from '@/os';
|
||||
|
||||
export function confetti(options: { duration?: number; } = {}) {
|
||||
const duration = options.duration ?? 1000 * 5;
|
||||
const duration = options.duration ?? 1000 * 4;
|
||||
const animationEnd = Date.now() + duration;
|
||||
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };
|
||||
|
||||
|
|
Loading…
Reference in a new issue