Giter VIP home page Giter VIP logo

Comments (6)

mohitkarangiya avatar mohitkarangiya commented on April 27, 2024 1

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.

LinusBorg avatar LinusBorg commented on April 27, 2024

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.

ShuvoHabib avatar ShuvoHabib commented on April 27, 2024

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.

LinusBorg avatar LinusBorg commented on April 27, 2024

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.

ShuvoHabib avatar ShuvoHabib commented on April 27, 2024

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.

nickmessing avatar nickmessing commented on April 27, 2024

@QqlimaaxX is right, closing for inactivity.

from babel-plugin-transform-vue-jsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.