index.js 940 字节
var main = new Vue({
    el:"#main",
    data:function(){
        return{
            // 公共数据
            allData:__data,
            // 左侧tab栏active
            leftKey:'course',
            // 右侧部分需要的数据
            nowData: {},
        }
    },
    // 计算属性
    computed: {
        videoList: function () {
            return this.nowData.videoList || []
        }

    },
    // 钩子函数
    mounted() {
        this.nowData = __data[this.leftKey]
        console.log("右侧数据",this.nowData)
    },
    // 监控属性
    watch: {
        // 监听导航按钮下标改变,使用导航对应的平台数据
        leftKey: function (newVal, oldVal) {
            this.nowData = __data[newVal]
        },
    },
    methods: {
        changeTabIndex: function (key) {
            console.log(this.leftKey)
            console.log(Key)
            this.leftKey = key;
        }
    },
})