index-page.js 962 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. var IndexPage = {
  2. template: '<div class="ui-grid">\
  3. <div ref="leftPanel" class="ui-col-0 plr10 left-panel">\
  4. <keep-alive>\
  5. <router-view name="leftView"></router-view>\
  6. </keep-alive>\
  7. </div>\
  8. <div ref="rightPanel" class="ui-col-1 plr10 c-position-r">\
  9. <keep-alive>\
  10. <router-view name="rightView"></router-view>\
  11. </keep-alive>\
  12. </div>\
  13. </div>',
  14. props: [],
  15. data: function() {
  16. return {
  17. }
  18. },
  19. created: function() {
  20. var vm = this
  21. },
  22. mounted: function() {
  23. var vm = this
  24. var leftPanel = vm.$refs.leftPanel
  25. var rightPanel = vm.$refs.rightPanel
  26. $(leftPanel).height($(window).height())
  27. $(rightPanel).height($(window).height())
  28. window.addEventListener('resize', _.debounce(function() {
  29. $(leftPanel).height($(window).height())
  30. $(rightPanel).height($(window).height())
  31. }, 300))
  32. },
  33. methods: {
  34. }
  35. }