Fix: 不要なanyの使用

This commit is contained in:
2026-06-06 12:41:45 +09:00
parent 37ce1aed50
commit 3cb63f08f2
4 changed files with 18 additions and 21 deletions
@@ -63,8 +63,9 @@ defineProps<{
const model = defineModel<string>();
const id = useId();
const resize = (event: any) => {
event.target.style.height = "auto";
event.target.style.height = event.target.scrollHeight + 'px';
const resize = (event: Event) => {
const target = event.target as HTMLTextAreaElement;
target.style.height = "auto";
target.style.height = target.scrollHeight + 'px';
}
</script>
@@ -183,10 +183,11 @@ const message = ref<string>("");
const isInsideRange = ref(false);
const isLoading = ref(false);
const messagesScroll = async (event: any) => {
const messagesScroll = async (event: Event) => {
const handleSize = 200;
const isCurrentInside = event.target.scrollTop < handleSize;
const target = event.target as HTMLDivElement;
const isCurrentInside = target.scrollTop < handleSize;
if (isCurrentInside && !isInsideRange.value && !isLoading.value) {
isLoading.value = true;
await new Promise<void>(resolve => setTimeout(resolve, 0));
@@ -230,9 +231,10 @@ const messagesScroll = async (event: any) => {
isInsideRange.value = isCurrentInside;
}
const resize = (event: any) => {
event.target.style.height = "auto";
event.target.style.height = event.target.scrollHeight + 'px';
const resize = (event: Event) => {
const target = event.target as HTMLTextAreaElement;
target.style.height = "auto";
target.style.height = target.scrollHeight + 'px';
}
const send = async (e: Event) => {
@@ -248,8 +248,9 @@ if (!account.value?.success) {
}
}
const handleOutsideClick = (event: any) => {
if (menuElem.value?.menuElem && !menuElem.value.menuElem.contains(event.target)) {
const handleOutsideClick = (event: Event) => {
const target = event.target as HTMLElement;
if (menuElem.value?.menuElem && !menuElem.value.menuElem.contains(target)) {
isMenuOpen.value = false;
}
}