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 layuiVueVersion = computed(() => {
if(!latestVer.value){
const ver = 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;
})
const layuiVueVersion = computed(() =>
latestVer.value
?? import.meta.env.LAYUI_VUE_VERSION
)
watch(isDark, () => {
if (isDark.value) {