From 06ac16fe5ab21047c53456c2d099a1bb0caf8b24 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Thu, 31 Mar 2022 16:28:15 +0800 Subject: [PATCH] =?UTF-8?q?chore(docs):=20=E5=9B=9E=E9=80=80=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=89=88=E6=9C=AC=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/src/layouts/Layout.vue | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/example/src/layouts/Layout.vue b/example/src/layouts/Layout.vue index 9b29a4bc..b82a7191 100644 --- a/example/src/layouts/Layout.vue +++ b/example/src/layouts/Layout.vue @@ -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) {