mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
upgrade version (#2023)
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user