var NewTemplate = { template: '
\
\ 模板未命名\
\
\ \
\
\ 创建新模板\
\
', props: [], data: function() { return { teamCode:'' } }, mounted: function() { var vm = this vm.$nextTick(function(){ EventBus.$on('getTeamCode',function(arg){ vm.teamCode=arg.teamCode }) }) }, methods: { newTemplate: function() { var vm = this vm.$router.push({ path:'/new-template-form', query:{ teamCode:vm.teamCode } }) } } }