quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
34 lines (29 loc) • 566 B
JavaScript
export default {
props: {
transitionShow: {
type: String,
default: 'fade'
},
transitionHide: {
type: String,
default: 'fade'
}
},
data () {
return {
transitionState: this.showing
}
},
watch: {
showing (val) {
this.transitionShow !== this.transitionHide && this.$nextTick(() => {
this.transitionState = val
})
}
},
computed: {
transition () {
return 'q-transition--' + (this.transitionState === true ? this.transitionHide : this.transitionShow)
}
}
}