3
//app
<app-sidebar menus="{{menus}}"></app-sidebar>
<app-header tabs="{{tabs}}"></app-header>
<div class="main">
<router-view id="view" class="view" v-transition="view" transition-mode="out-in"></router-view>
</div>
//route
module.exports =
template: require './template.html'
data: ->
menus: [
{'name': '热词', 'icon': 'glyphicon glyphicon-header', 'url': '/hotwords'},
{'name': '热词', 'icon': 'glyphicon glyphicon-header', 'url': '/a'}
],
tabs: [
{'name': '热词', 'icon': 'glyphicon glyphicon-header'},
{'name': '热词', 'icon': 'glyphicon glyphicon-header'}
]
怎么把 menus 给app-sidebar ,如果写在view里面,每个view都要写一次