upgrade version (#2023)

pull/2026/head
杨奕 2016-12-27 18:38:16 +08:00 committed by cinwell.li
parent b5e4994c01
commit e5c22a7cd0
2 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<footer class="footer">
<div class="container">
<div class="footer-main">
<p class="footer-main-title">Element 1.0 Hydrogen</p>
<p class="footer-main-title">Element {{ version }} Hydrogen</p>
<a href="https://github.com/ElemeFE/element/issues" class="footer-main-link" target="_blank">{{ langConfig.feedback }}</a>
<a href="https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md" class="footer-main-link" target="_blank">{{ langConfig.contribution }}</a>
</div>
@ -134,8 +134,15 @@
<script type="text/babel">
import compoLang from '../i18n/component.json';
import { version } from 'main/index.js';
export default {
data() {
return {
version
};
},
computed: {
lang() {
return this.$route.path.split('/')[1];

View File

@ -163,6 +163,7 @@
</template>
<script>
import compoLang from '../i18n/component.json';
import { version } from 'main/index.js';
export default {
props: {
@ -178,7 +179,7 @@
navState: [],
isSmallScreen: false,
versions: [],
version: '',
version,
dropdownVisible: false
};
},
@ -248,13 +249,6 @@
xhr.onreadystatechange = _ => {
if (xhr.readyState === 4 && xhr.status === 200) {
this.versions = JSON.parse(xhr.responseText);
const pathname = location.pathname.replace(/\//, '');
if (pathname.length > 0) {
this.version = pathname;
} else {
const versionArr = Object.keys(this.versions);
this.version = versionArr[versionArr.length - 1];
}
}
};
xhr.open('GET', '/versions.json');