From 2389857be8c5c12099e921a0468957fa2c813d1a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 8 Feb 2020 14:31:51 +0900 Subject: [PATCH] :art: --- src/client/components/ui/container.vue | 51 ++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/src/client/components/ui/container.vue b/src/client/components/ui/container.vue index 19820a307..66f55102b 100644 --- a/src/client/components/ui/container.vue +++ b/src/client/components/ui/container.vue @@ -8,9 +8,18 @@ -
- -
+ +
+ +
+
@@ -51,12 +60,45 @@ export default Vue.extend({ toggleContent(show: boolean) { if (!this.bodyTogglable) return; this.showBody = show; - } + }, + + beforeEnter(el) { + el.style.height = '0'; + }, + enter(el) { + setTimeout(() => { + el.style.height = el.scrollHeight + 'px'; + }, 10); // HACKY: Vueのバグか知らないけどこうしないと動作しない + }, + afterEnter(el) { + el.style.height = 'auto'; + }, + beforeLeave(el) { + el.style.height = el.scrollHeight + 'px'; + }, + leave(el) { + setTimeout(() => { + el.style.height = '0'; + }, 10); // HACKY: Vueのバグか知らないけどこうしないと動作しない + }, + afterLeave(el) { + el.style.height = 'auto'; + }, } });