2016-11-09 19:15:25 +08:00
|
|
|
<style>
|
|
|
|
.page-changelog {
|
|
|
|
padding-bottom: 100px;
|
|
|
|
|
|
|
|
.fr {
|
|
|
|
float: right;
|
|
|
|
padding: 0;
|
2017-09-28 20:15:00 +08:00
|
|
|
|
|
|
|
&.el-button {
|
|
|
|
transform: translateY(-3px);
|
|
|
|
}
|
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
a {
|
|
|
|
display: block;
|
|
|
|
padding: 10px 15px;
|
2017-09-28 20:15:00 +08:00
|
|
|
color: #333;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
&:hover a {
|
2017-10-01 20:16:16 +08:00
|
|
|
color: #409EFF;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
|
|
|
}
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
.heading {
|
2017-09-28 20:15:00 +08:00
|
|
|
font-size: 24px;
|
|
|
|
margin-bottom: 60px;
|
|
|
|
color: #333;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
.timeline {
|
2017-09-28 20:15:00 +08:00
|
|
|
padding: 0;
|
|
|
|
padding-bottom: 10px;
|
2016-11-09 19:15:25 +08:00
|
|
|
position: relative;
|
|
|
|
color: #5e6d82;
|
|
|
|
|
|
|
|
> li {
|
|
|
|
position: relative;
|
2017-09-28 20:15:00 +08:00
|
|
|
padding-bottom: 15px;
|
|
|
|
list-style: none;
|
2016-11-09 19:15:25 +08:00
|
|
|
line-height: 1.8;
|
2017-09-28 20:15:00 +08:00
|
|
|
border: 1px solid #ddd;
|
|
|
|
border-radius: 4px;
|
2016-11-09 19:15:25 +08:00
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
2017-09-28 20:15:00 +08:00
|
|
|
padding: 30px 30px 15px;
|
|
|
|
|
2017-02-22 18:16:48 +08:00
|
|
|
ul {
|
2017-09-28 20:15:00 +08:00
|
|
|
padding: 0;
|
|
|
|
padding-top: 5px;
|
|
|
|
padding-left: 27px;
|
|
|
|
|
|
|
|
li {
|
|
|
|
padding-left: 0;
|
|
|
|
color: #555;
|
2017-10-16 18:05:40 +08:00
|
|
|
word-break: normal;
|
2017-09-28 20:15:00 +08:00
|
|
|
}
|
|
|
|
|
2017-02-22 18:16:48 +08:00
|
|
|
li::before {
|
|
|
|
content: '';
|
|
|
|
circle: 4px #fff;
|
2017-09-28 20:15:00 +08:00
|
|
|
border: solid 1px #333;
|
|
|
|
margin-right: -12px;
|
2017-02-22 18:16:48 +08:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
}
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
li li {
|
2017-09-28 20:15:00 +08:00
|
|
|
font-size: 16px;
|
2016-11-09 19:15:25 +08:00
|
|
|
list-style: none;
|
2017-09-28 20:15:00 +08:00
|
|
|
padding-left: 20px;
|
|
|
|
padding-bottom: 5px;
|
|
|
|
color: #333;
|
2016-11-28 17:12:08 +08:00
|
|
|
word-break: break-all;
|
2016-11-09 19:15:25 +08:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: '';
|
2017-09-28 20:15:00 +08:00
|
|
|
circle: 6px #333;
|
|
|
|
transform: translateX(-20px);
|
2016-11-09 19:15:25 +08:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
}
|
2017-09-30 15:57:08 +08:00
|
|
|
|
|
|
|
i {
|
|
|
|
padding: 0 20px;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2016-11-09 19:15:25 +08:00
|
|
|
|
|
|
|
h3 {
|
2017-09-28 20:15:00 +08:00
|
|
|
margin:0;
|
|
|
|
padding: 15px 30px;
|
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
|
font-size: 20px;
|
|
|
|
color: #333;
|
|
|
|
font-weight: bold;
|
2016-11-09 19:15:25 +08:00
|
|
|
|
|
|
|
a {
|
|
|
|
opacity: 1;
|
2017-09-28 20:15:00 +08:00
|
|
|
font-size: 20px;
|
2016-11-09 19:15:25 +08:00
|
|
|
float: none;
|
|
|
|
margin-left: 0;
|
2017-09-28 20:15:00 +08:00
|
|
|
color: #333;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
|
|
|
}
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
h4 {
|
2017-09-28 20:15:00 +08:00
|
|
|
margin: 0;
|
|
|
|
margin-bottom: -10px;
|
|
|
|
font-size: 18px;
|
|
|
|
padding-left: 54px;
|
|
|
|
padding-top: 30px;
|
|
|
|
font-weight: bold;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
em {
|
|
|
|
position: absolute;
|
2017-09-28 20:15:00 +08:00
|
|
|
right: 30px;
|
2016-11-09 19:15:25 +08:00
|
|
|
font-style: normal;
|
2017-09-28 20:15:00 +08:00
|
|
|
top: 23px;
|
|
|
|
font-size: 16px;
|
|
|
|
color: #666;
|
2016-11-09 19:15:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<template>
|
|
|
|
<div class="page-changelog">
|
|
|
|
<div class="heading">
|
|
|
|
<el-button class="fr">
|
2017-12-12 12:45:09 +08:00
|
|
|
<a href="https://github.com/ElemeFE/element/releases" target="_blank">GitHub Releases</a>
|
2016-11-09 19:15:25 +08:00
|
|
|
</el-button>
|
2016-11-10 21:46:55 +08:00
|
|
|
<%= 1 >
|
2016-11-09 19:15:25 +08:00
|
|
|
</div>
|
|
|
|
<ul class="timeline" ref="timeline">
|
|
|
|
</ul>
|
|
|
|
<change-log ref="changeLog"></change-log>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2016-11-10 21:46:55 +08:00
|
|
|
import ChangeLog from '../../../CHANGELOG.<%= 2 >.md';
|
2017-09-28 20:15:00 +08:00
|
|
|
|
2016-11-09 19:15:25 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
ChangeLog
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
count: 3
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
const changeLog = this.$refs.changeLog;
|
|
|
|
const changeLogNodes = changeLog.$el.children;
|
|
|
|
let a = changeLogNodes[1].querySelector('a');
|
|
|
|
a && a.remove();
|
|
|
|
let release = changeLogNodes[1].textContent.trim();
|
|
|
|
let fragments = `<li><h3><a href="https://github.com/ElemeFE/element/releases/tag/v${release}" target="_blank">${release}</a></h3>`;
|
|
|
|
|
|
|
|
for (let len = changeLogNodes.length, i = 2; i < len; i++) {
|
|
|
|
let node = changeLogNodes[i];
|
|
|
|
a = changeLogNodes[i].querySelector('a');
|
2017-07-06 14:26:51 +08:00
|
|
|
a && a.getAttribute('class') === 'header-anchor' && a.remove();
|
2016-11-09 19:15:25 +08:00
|
|
|
if (node.tagName !== 'H3') {
|
|
|
|
fragments += changeLogNodes[i].outerHTML;
|
|
|
|
} else {
|
|
|
|
release = changeLogNodes[i].textContent.trim();
|
|
|
|
fragments += `</li><li><h3><a href="https://github.com/ElemeFE/element/releases/tag/v${release}" target="_blank">${release}</a></h3>`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fragments = fragments.replace(/#(\d+)/g, '<a href="https://github.com/ElemeFE/element/issues/$1" target="_blank">#$1</a>');
|
2017-01-12 16:41:22 +08:00
|
|
|
fragments = fragments.replace(/@(\w+)/g, '<a href="https://github.com/$1" target="_blank">@$1</a>');
|
2016-11-09 19:15:25 +08:00
|
|
|
this.$refs.timeline.innerHTML = `${fragments}</li>`;
|
|
|
|
|
|
|
|
changeLog.$el.remove();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|