import tabsData from "../data/tabs";

export default {

    data(){
        return {
            tabsData:tabsData,
            loadings:[],
            value:0,
            first:false
        }
    },

    onLoad:function(){

        if (this.$params.select) {
            this.value = parseInt(this.$params.select);
        } else {
            this.first = true;
        }

    },

    methods:{

        /* change的时候触发 */
        change:function(detail){
            if (detail.loading) {
                setTimeout(()=>{
                    this.$set(this.loadings,detail.index,true)
                },300);
            }

        }
    }

}