반응형
Vuetify.js - 동적 카드 높이 애니메이션
v-card에 2개의 단락(큰 단락과 작은 단락)이 있어 버튼을 클릭할 수 있습니다.전환 중에 카드를 펼치는 것처럼 애니메이션을 할 수 있는 방법이 있습니까?이렇게 보입니다.
<v-card>
<v-btn @click="show=!show" flat>show</v-btn>
<v-card-text v-show="show">
<!-- short paragraph -->
</v-card-text>
<v-card-text v-show="!show">
<!-- long paragraph -->
</v-card-text>
</v-card>
추정하다show
는 vue 객체에 정의되어 있는 변수입니다.
사용할 수 있습니다.v-expand-transition
Vuetify에서 : https://vuetifyjs.com/en/framework/transitions#expand-transition 를 참조해 주세요.
하나만 사용하세요.v-card-text
포함div
짧은 단락과 긴 단락 각각에 대해 그리고 각각으로 포장합니다.v-expand-transition
<v-card-text>
<v-expand-transition>
<div v-show="show">This is a short paragraph</div>
</v-expand-transition>
<v-expand-transition>
<div v-show="!show">
<p>A looooong</p>
<p>paragraph</p>
</div>
</v-expand-transition>
</v-card-text>
Code Sandbox의 작업 예: https://codesandbox.io/s/stack-overflow-q46305305-4qq4940x5w
언급URL : https://stackoverflow.com/questions/46305305/vuetify-js-dynamic-card-height-animation
반응형
'programing' 카테고리의 다른 글
stdin이 단자인지 파이프인지 검출할 수 있습니까? (0) | 2022.07.21 |
---|---|
개인 메서드, 필드 또는 내부 클래스가 있는 클래스를 테스트하려면 어떻게 해야 합니까? (0) | 2022.07.21 |
열거값을 int로 변환하는 방법 (0) | 2022.07.21 |
Java Regex의 matches()와 find()의 차이 (0) | 2022.07.20 |
Java에서 파라미터를 참조로 전달할 수 있습니까? (0) | 2022.07.16 |