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

no need set init data;just use async data #2512

Open
wants to merge 2 commits into
base: dev
from

Conversation

Projects
None yet
1 participant
@miewx

miewx commented Dec 2, 2018

use like this

export default {
    beforeRouteEnter:(from, to, next)->
        li = (await $.get '/api/li.txt').split('\n').filter(Boolean)
        @data = ->
            {
                n:0
                now:1
                li
                src : [
                    li[0]
                    li[1]
                ]
            }
        next()

ol@xvc.com added some commits Dec 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment