Vue.component('inner-tabs', { template: '
\ \
\ \
\
', props: ["tabs","activeidx"], data: function() { return { url: "", height:function(){ var winH = document.documentElement.clientHeight; return winH - 115; }(), } }, methods: { load: function(tab, index) { this.url = tab.href this.activeidx = index } }, mounted: function() { }, watch: { activeidx: function(idx) { this.url = this.tabs[idx].href } } })