forked from FoundKeyGang/FoundKey
add type annotations
This commit is contained in:
parent
3f59b7f705
commit
60e49a4196
1 changed files with 2 additions and 2 deletions
|
@ -23,9 +23,9 @@ const props = withDefaults(defineProps<{
|
||||||
reverse: false,
|
reverse: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
let contentEl = $ref();
|
let contentEl: HTMLElement = $ref();
|
||||||
|
|
||||||
function calc() {
|
function calc(): void {
|
||||||
const eachLength = contentEl.offsetWidth / props.repeat;
|
const eachLength = contentEl.offsetWidth / props.repeat;
|
||||||
const factor = 3000;
|
const factor = 3000;
|
||||||
const duration = props.duration / ((1 / eachLength) * factor);
|
const duration = props.duration / ((1 / eachLength) * factor);
|
||||||
|
|
Loading…
Reference in a new issue