header-tab.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Vue.component('header-tab', {
  2. template: '<div class="div-header">\
  3. <div class="fl">\
  4. <div class="application-name">{{appname}}</div>\
  5. <div class="vertical-line"></div>\
  6. <img v-show="isback" @click="back" src="../../../images/fanhui_icon.png" width="18" height="18" class="mr10 vam" />\
  7. <img v-show="isrefresh" @click="refresh" src="../../../images/shuaxin_icon.png" width="18" height="18" class="vam" />\
  8. </div>\
  9. <div class="fr mt10">\
  10. <img v-show="isdownload" @click="download" src="../../../images/download.png" width="18" height="18" class="mr10" />\
  11. <img v-show="isfilter" @click="filter" src="../../../images/xuanzhe_icon.png" width="18" height="18" class="mr10" />\
  12. <img v-show="isopen" @click="open" src="../../../images/zhankai_icon.png" width="18" height="18" />\
  13. </div>\
  14. </div>',
  15. props: ["appname","code","isback", "isrefresh","isfilter","isopen", "isdownload"],
  16. data: function() {
  17. return {
  18. }
  19. },
  20. mounted: function() {
  21. },
  22. methods: {
  23. //返回事件
  24. back:function(){
  25. EventBus.$emit('back-click', {});
  26. },
  27. //刷新事件
  28. refresh:function(){
  29. EventBus.$emit('refresh-click', {});
  30. },
  31. //筛选事件
  32. filter:function(){
  33. EventBus.$emit('filter-click', {});
  34. },
  35. //展开事件
  36. open:function(){
  37. EventBus.$emit('open-click', {});
  38. },
  39. download: function(){
  40. this.$emit('download', {});
  41. }
  42. }
  43. })