refactor(ui): replaced some n-input to c-input (#505)

This commit is contained in:
Corentin THOMASSET 2023-06-25 15:00:50 +02:00 committed by GitHub
parent 5c3bebfe62
commit 05ea545475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 189 additions and 235 deletions

View file

@ -82,12 +82,12 @@ const inputRef = ref<HTMLInputElement>();
const inputWrapperRef = ref<HTMLElement>();
watch(
value,
() => {
[value, autosize, multiline, inputWrapperRef, textareaRef],
() => nextTick(() => {
if (props.multiline && autosize.value) {
resizeTextarea();
}
},
}),
{ immediate: true },
);
@ -96,9 +96,9 @@ function resizeTextarea() {
return;
}
const { scrollHeight } = textareaRef.value;
const scrollHeight = textareaRef.value.scrollHeight + 2;
inputWrapperRef.value.style.height = `${scrollHeight + 2}px`;
inputWrapperRef.value.style.height = `${scrollHeight}px`;
}
const htmlInputType = computed(() => {