Nativescript Vue:有没有一种方法可以简化组件而不是突然 show/hide?
Nativescript Vue: Is there a way to ease in components rather than an abrupt show/hide?
我一直在使用 v-show
,但有些组件感觉不合适。突然显示或突然隐藏组件是一种不和谐的体验。 NS Vue 中有什么方法可以更顺畅地执行此操作吗?我知道 transition
不支持 height
,这本来是一个很好的解决方案,所以我不知道还能做什么。
您可以只使用 Vue 包装器 transition
:
<transition name="fade">
<Label class="my-label" v-show="show">hello</Label>
</transition>
您可以在 css
文件或代码段中添加
.my-label {
height: 80; // or whatever height you want it to have
}
我一直在使用 v-show
,但有些组件感觉不合适。突然显示或突然隐藏组件是一种不和谐的体验。 NS Vue 中有什么方法可以更顺畅地执行此操作吗?我知道 transition
不支持 height
,这本来是一个很好的解决方案,所以我不知道还能做什么。
您可以只使用 Vue 包装器 transition
:
<transition name="fade">
<Label class="my-label" v-show="show">hello</Label>
</transition>
您可以在 css
文件或代码段中添加
.my-label {
height: 80; // or whatever height you want it to have
}