chore(docs): 回退获取版本方式

This commit is contained in:
sight 2022-03-31 16:28:15 +08:00
parent 33cb2ba3bf
commit 06ac16fe5a

View File

@ -257,17 +257,10 @@ export default {
}); });
const latestVer = getLayuiVueVersion(); const latestVer = getLayuiVueVersion();
const layuiVueVersion = computed(() => { const layuiVueVersion = computed(() =>
if(!latestVer.value){ latestVer.value
const ver = import.meta.env.LAYUI_VUE_VERSION; ?? import.meta.env.LAYUI_VUE_VERSION
const idx = ver.indexOf("-"); )
const isPreRelease = (idx != -1);
if(isPreRelease){
latestVer.value = ver.substring(0, idx)
}
}
return latestVer.value;
})
watch(isDark, () => { watch(isDark, () => {
if (isDark.value) { if (isDark.value) {