index.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. define([
  2. 'text!components/base_footer/index.html',
  3. 'css!components/base_footer/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. // this.$emit('action', this.$refs.sidebar.clientHeight);
  27. });
  28. },
  29. updated: function () {
  30. this.$nextTick(function () {
  31. this.sidebarHeight = this.$refs.sidebar.clientHeight;
  32. this.$emit('action', this.$refs.sidebar.clientHeight);
  33. });
  34. },
  35. methods: {
  36. goPage: function () {
  37. window.canCustomerServer.getCustomeServer();
  38. }
  39. },
  40. template: html
  41. };
  42. });