new-template.js 842 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. var NewTemplate = {
  2. template: '<div>\
  3. <div class="title-name c-f16">\
  4. <span class="c-vam">模板未命名</span>\
  5. </div>\
  6. <div class="c-t-center">\
  7. <img src="../../../images/wushuju_img.png" class="wushuju"/>\
  8. </div>\
  9. <div class="c-t-center mt30">\
  10. <a @click="newTemplate" class="new-temp-btn">创建新模板</a>\
  11. </div>\
  12. </div>',
  13. props: [],
  14. data: function() {
  15. return {
  16. teamCode:''
  17. }
  18. },
  19. mounted: function() {
  20. var vm = this
  21. vm.$nextTick(function(){
  22. EventBus.$on('getTeamCode',function(arg){
  23. vm.teamCode=arg.teamCode
  24. })
  25. })
  26. },
  27. methods: {
  28. newTemplate: function() {
  29. var vm = this
  30. vm.$router.push({
  31. path:'/new-template-form',
  32. query:{
  33. teamCode:vm.teamCode
  34. }
  35. })
  36. }
  37. }
  38. }