index.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. define([
  2. 'text!./index.html',
  3. 'css!./index.css'
  4. ], function (html) {
  5. return {
  6. props: {
  7. publicData: {
  8. type: Object,
  9. default: function () {
  10. return {};
  11. }
  12. }
  13. },
  14. data: function () {
  15. return {
  16. year: new Date().getFullYear(),
  17. code_url: '',
  18. sidebarHeight: 0
  19. };
  20. },
  21. mounted: function () {
  22. this.$nextTick(function () {
  23. if (code_url) {
  24. this.code_url = code_url;
  25. }
  26. });
  27. },
  28. updated: function () {
  29. this.$nextTick(function () {
  30. this.sidebarHeight = this.$refs.sidebar.clientHeight;
  31. this.$emit('action', this.$refs.sidebar.clientHeight);
  32. });
  33. },
  34. methods: {
  35. goPage: function () {
  36. window.useCustomerServer.getCustomeServer();
  37. }
  38. },
  39. template: html
  40. };
  41. });