From 50c449fa7f643e06b975ac06630a2ea17f69931e Mon Sep 17 00:00:00 2001 From: MaysWind Date: Thu, 7 Jan 2021 00:29:34 +0800 Subject: [PATCH] auto increase comment textarea height, hide placeholder in view mode --- src/views/mobile/transactions/Edit.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/mobile/transactions/Edit.vue b/src/views/mobile/transactions/Edit.vue index 2156a20c..f3e6aca4 100644 --- a/src/views/mobile/transactions/Edit.vue +++ b/src/views/mobile/transactions/Edit.vue @@ -222,10 +222,11 @@ @@ -661,6 +662,16 @@ export default { } }); }, + changeSize(event) { + const textarea = event.target; + + if (!textarea) { + return; + } + + textarea.scrollTop = 0; + textarea.style.height = textarea.scrollHeight + 'px'; + }, isCategoryIdAvailable(categories, categoryId) { if (!categories || !categories.length) { return false;