forked from FoundKeyGang/FoundKey
add type annotations
This commit is contained in:
parent
b95f90eb15
commit
b018b05c5c
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