Comments (6)
I suppose , your css should look something like this
.fade-enter-active, .fade-leave-active { transition: opacity .5s } .fade-enter, .fade-leave-to { opacity: 0 }
from babel-plugin-transform-vue-jsx.
in Vue 2.0, transitions are done with a <transtition>
component, not an attribute:
http://rc.vuejs.org/guide/transitions.html#Transitioning-Single-Elements-Components
from babel-plugin-transform-vue-jsx.
Thanks LinusBorg. but still it's not working. Can you show me any working example with JSX ?
```
<transition name="slide-fade">
<ShortDesc />
</transition>
Added css in style.css
from babel-plugin-transform-vue-jsx.
let's do it the other way around: you show me the code you use (plus CSS), not just the small, incomplete snippet like above, and we go from there.
from babel-plugin-transform-vue-jsx.
Thanks LinusBorg for stopping by. The code snippet: The transition fade is not working.
Component
export default {
data() {
return {
showLongDesc: true
};
},
methods: {
handleClick() {
this.showLongDesc = !this.showLongDesc;
}
},
render(h) { //eslint-disable-line no-unused-vars
const showLongDesc = this.showLongDesc ? 'hide' : 'block';
return (
<aside>
<button on-click={this.handleClick}>Click</button>
<transition name="fade">
<div class={showLongDesc}>
<LongDesc />
</div>
</transition>
</aside>
);
}
};
CSS at 'style.css' file
.fade-enter-active, .fade-leave-active {
transition: opacity .5s
}
.fade-enter, .fade-leave-active {
opacity: 0
}
from babel-plugin-transform-vue-jsx.
@QqlimaaxX is right, closing for inactivity.
from babel-plugin-transform-vue-jsx.
Related Issues (20)
- how to pass a prop named "model" to the custom component like el-form
- `h` is not auto-injected with Laravel-Mix and Vue using @vue/babel-plugin-transform-vue-jsx v1.0.0-beta.3 HOT 1
- sass content in .vue file not compiled HOT 1
- Concrete preset instead on env HOT 1
- Vuetify modifiers behave differently
- Vue 3 and TSX HOT 6
- rollup+babel+babel-plugin-transform-vue-jsx package size so big
- delete this
- delete this
- delete this
- delete this
- JSX fragment syntax (<> ... </>) HOT 4
- How to add JSX Support to Existing MVC .NET Application
- How to add 'comments' in vue jsx HOT 2
- JSX compilation fails when nested under another node_modules directory
- Support for xmlns:xlink attribute
- how to write the arguments of the custom directives? HOT 2
- String turn into jsx code HOT 1
- [Question] How to use emits in component ?
- Convert JSX to string in template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-transform-vue-jsx.