mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
auto increase comment textarea height, hide placeholder in view mode
This commit is contained in:
@@ -222,10 +222,11 @@
|
|||||||
|
|
||||||
<f7-list-input
|
<f7-list-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
style="height: auto"
|
||||||
:label="$t('Description')"
|
:label="$t('Description')"
|
||||||
:placeholder="$t('Your transaction description (optional)')"
|
:placeholder="mode !== 'view' ? $t('Your transaction description (optional)') : ''"
|
||||||
:value="transaction.comment"
|
:value="transaction.comment"
|
||||||
@input="transaction.comment = $event.target.value"
|
@input="transaction.comment = $event.target.value; changeSize($event)"
|
||||||
></f7-list-input>
|
></f7-list-input>
|
||||||
</f7-list>
|
</f7-list>
|
||||||
</f7-card-content>
|
</f7-card-content>
|
||||||
@@ -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) {
|
isCategoryIdAvailable(categories, categoryId) {
|
||||||
if (!categories || !categories.length) {
|
if (!categories || !categories.length) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user