Fix eslint warnings
This commit is contained in:
parent
fba72e723f
commit
7b10670a88
6 changed files with 19 additions and 10 deletions
|
|
@ -41,7 +41,9 @@ function createSomeNotes() {
|
|||
.map(({ it }) => it);
|
||||
}
|
||||
|
||||
onMounted(() => createSomeNotes());
|
||||
onMounted(() => {
|
||||
createSomeNotes();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const { floatingStyles } = useFloating(reference, floating, {
|
|||
offset(4),
|
||||
size({
|
||||
apply({ availableHeight, elements }) {
|
||||
elements.floating.style.maxHeight = `${Math.max(100, availableHeight)}px`;
|
||||
elements.floating.style.maxHeight = `${Math.max(100, availableHeight).toFixed()}px`;
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const children = computed(() => {
|
|||
const seen = new Map<string, number>();
|
||||
const children = [];
|
||||
for (const id of note.value.children) {
|
||||
const iteration = seen.get(id) || 0;
|
||||
const iteration = seen.get(id) ?? 0;
|
||||
seen.set(id, iteration + 1);
|
||||
children.push(new Segment(id, iteration));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const emit = defineEmits<{
|
|||
}>();
|
||||
|
||||
const textarea = useTemplateRef<HTMLTextAreaElement>("textarea");
|
||||
const text = ref(props.initialText || "");
|
||||
const text = ref(props.initialText ?? "");
|
||||
|
||||
onMounted(() => {
|
||||
textarea.value?.focus();
|
||||
|
|
@ -23,7 +23,7 @@ onMounted(() => {
|
|||
function updateTextareaHeight() {
|
||||
if (!textarea.value) return;
|
||||
textarea.value.style.height = "0px";
|
||||
textarea.value.style.height = `${textarea.value.scrollHeight}px`;
|
||||
textarea.value.style.height = `${textarea.value.scrollHeight.toFixed()}px`;
|
||||
}
|
||||
|
||||
function onInput() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue