From b55bac00dffb65804cd9134bfaddd8f629c51238 Mon Sep 17 00:00:00 2001 From: Jevin Date: Fri, 10 May 2024 19:50:35 +0800 Subject: [PATCH] chore: update --- src/components/Header.vue | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index a3596a1..c803fd0 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -27,15 +27,9 @@ interface Version { active: string } -const currentLib = ref('layuiVue') const libs = ['layuiVue', 'layui'] -// FIXME 临时的兼容方法 -if (window.location.search.includes('deps=layui')) { - currentLib.value = 'layui' -} - -const versions = reactive>({ +const versions = reactive, Version>>({ layuiVue: { text: 'layui-vue', published: getSupportedLayuiVueVersions(), @@ -53,7 +47,7 @@ const versions = reactive>({ }, }) -const versionsLayui = reactive>({ +const versionsLayui = reactive, Version>>({ layui: { text: 'layui', published: getSupportedLayuiVersions(), @@ -62,7 +56,7 @@ const versionsLayui = reactive>({ }) async function setVersion(key: VersionKey, v: string) { - const _versions = currentLib.value === 'layuiVue' ? versions : versionsLayui + const _versions = store.libName === 'layuiVue' ? versions : versionsLayui _versions[key].active = `loading...` await store.setVersion(key, v) @@ -111,7 +105,7 @@ function refreshView() {
@@ -120,7 +114,9 @@ function refreshView() {