Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opacity animation never plays #79

Open
henrikruscon opened this issue Sep 27, 2018 · 0 comments
Open

Opacity animation never plays #79

henrikruscon opened this issue Sep 27, 2018 · 0 comments

Comments

@henrikruscon
Copy link

henrikruscon commented Sep 27, 2018

Opacity animation never plays out because width is set to 0 instantly after I set app.$Progress.finish()

Here's my VueX store axios plugin with interceptors:

import axios from 'axios'
import app from '@/main'

export default function axiosPlugin() {
    return store => {
        store.$axios = axios.create({
            baseURL: '/'
        })

        store.$axios.interceptors.request.use(request => {
            app.$Progress.start()

            return request
        })

        store.$axios.interceptors.response.use(
            response => {
                app.$Progress.finish()

                return response
            },
            error => {
                app.$Progress.fail()

                return Promise.reject(error)
            }
        )
    }
}

Here's my progressbar setup:

import Vue from 'vue'
import VueProgressBar from 'vue-progressbar'

Vue.use(VueProgressBar)

Finally my main.js:

import Vue from 'vue'
import store from '@/store'
import App from '@/components/App'

import '@/components'
import '@/plugins/progressbar'

Vue.config.productionTip = false

export default new Vue({
    store,
    ...App
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant