changelog.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <style>
  2. .page-changelog {
  3. padding-bottom: 100px;
  4. .fr {
  5. float: right;
  6. }
  7. h2 {
  8. margin-bottom: 40px;
  9. }
  10. .timeline {
  11. margin: 0 0 0 105px;
  12. padding-left: 25px;
  13. position: relative;
  14. color: #5e6d82;
  15. &:before {
  16. content: '';
  17. width: 1px;
  18. height: 100%;
  19. position: absolute;
  20. left: 0;
  21. top: 10px;
  22. background-color: #eaeefa;
  23. }
  24. > li {
  25. list-style: none;
  26. position: relative;
  27. &:not(:last-child) {
  28. margin-bottom: 50px;
  29. }
  30. &:first-child {
  31. margin-top: -10px;
  32. h3:before {
  33. left: -33px;
  34. top: 5px;
  35. width: 16px;
  36. height: @width;
  37. background-color: #81c8fa;
  38. border: 0;
  39. }
  40. }
  41. }
  42. ul {
  43. padding-left: 0;
  44. }
  45. li li {
  46. font-size: 14px;
  47. list-style: none;
  48. padding-left: 0;
  49. &:before {
  50. content: '';
  51. circle: 4px #5e6d82;
  52. margin-right: 5px;
  53. display: inline-block;
  54. vertical-align: middle;
  55. }
  56. }
  57. h3 {
  58. margin: 0 0 10px;
  59. &:before {
  60. content: '';
  61. display: block;
  62. position: absolute;
  63. left: -31px;
  64. top: 7px;
  65. circle: 13px transparent;
  66. border: 2px solid #2ca2fc;
  67. box-sizing: border-box;
  68. }
  69. }
  70. h4 {
  71. margin: 50px 0 10px;
  72. }
  73. p {
  74. margin: 0;
  75. }
  76. em {
  77. position: absolute;
  78. left: -127px;
  79. font-style: normal;
  80. top: 4px;
  81. font-size: 14px;
  82. color: #99a9bf;
  83. }
  84. }
  85. }
  86. </style>
  87. <template>
  88. <div class="page-container page-changelog">
  89. <h2><el-button class="fr">Github Releases</el-button>更新日志</h2>
  90. <ul class="timeline" ref="timeline">
  91. </ul>
  92. <change-log ref="changeLog"></change-log>
  93. <!-- <ul class="timeline">
  94. <li>
  95. <h3>2.0.0</h3>
  96. <em>2016.06.29</em>
  97. <p>很高兴的通知各位,经过四个月时间的紧密开发,Element v1.0.0 终于发布了。从去年 5 月 7 日提交第一行代码以来, 经过整整一年的开发迭代,Element 受到社区的大量关注,使用的公司和产品持续增加,已经日趋成熟。这个版本我们重构了底层代码和站点,持续完善现有组件功能和优化细节,其中很多都来自社区的贡献,无法一一感谢,欢迎各位持续关注和鞭策。在升级过程中遇到任何问题,请及时反馈给我们。</p>
  98. <h4>新增</h4>
  99. <ul>
  100. <li>支持按需加载。可参考 element-init 的模版代码, 需要配合 babel-plugin-antd 插件和 style 配置进行使用。#900</li>
  101. <li>结全新单页站点,使用 React 和 antd 进行了彻底重构,加载更快,访问更流畅。</li>
  102. </ul>
  103. <h4>优化</h4>
  104. <ul>
  105. <li>支持按需加载。可参考 element-init 的模版代码, 需要配合 babel-plugin-antd 插件和 style 配置进行使用。#900</li>
  106. <li>结全新单页站点,使用 React 和 antd 进行了彻底重构,加载更快,访问更流畅。</li>
  107. </ul>
  108. </li>
  109. <li>
  110. <h3>1.6.1</h3>
  111. <em>2016.06.29</em>
  112. <ul>
  113. <li>支持按需加载。可参考 element-init 的模版代码, 需要配合 babel-plugin-antd 插件和 style 配置进行使用。#900</li>
  114. <li>结全新单页站点,使用 React 和 antd 进行了彻底重构,加载更快,访问更流畅。</li>
  115. </ul>
  116. </li>
  117. </ul> -->
  118. </div>
  119. </template>
  120. <script>
  121. import ChangeLog from '../../CHANGELOG.md';
  122. export default {
  123. components: {
  124. ChangeLog
  125. },
  126. data() {
  127. return {
  128. count: 3
  129. };
  130. },
  131. mounted() {
  132. var changeLog = this.$refs.changeLog;
  133. var changeLogNodes = changeLog.$el.children;
  134. var fragments = '<li>' + changeLogNodes[1].outerHTML;
  135. for (let len = changeLogNodes.length, i = 2; i < len; i++) {
  136. let node = changeLogNodes[i];
  137. fragments += node.tagName !== 'H3'
  138. ? changeLogNodes[i].outerHTML
  139. : `</li><li>${changeLogNodes[i].outerHTML}`;
  140. }
  141. this.$refs.timeline.innerHTML = `${fragments}</li>`;
  142. changeLog.$el.remove();
  143. }
  144. };
  145. </script>