vue2.0生命周期、计算属性、watch的执行顺序

    created(){
        console.log('created')
        this.PageIndex=2
    },
    mounted() {
        this.getAppData()
        console.log('mounted')
    },
    computed: {
        apps(){
            console.log('computed')
            return this.$store.state[this.apiApp.store][this.apiApp.resData];
        }
    },
    watch:{
        PageIndex(){
            console.log('watch')
        }
    }
powerConfigure.vue?0839:62 created
powerConfigure.vue?0839:71 computed
powerConfigure.vue?0839:67 mounted
powerConfigure.vue?0839:77 watch

 

请使用手机"扫一扫"x

posted @ 2017-08-04 14:06  sunsian  阅读(4973)  评论(0编辑  收藏  举报