diff --git a/src/utils/getLayuiVueVersion.ts b/src/utils/getLayuiVueVersion.ts index 99f3fd83..8f7c9326 100644 --- a/src/utils/getLayuiVueVersion.ts +++ b/src/utils/getLayuiVueVersion.ts @@ -1,10 +1,13 @@ import { useFetch } from "@vueuse/core"; export function getLayuiVueVersion() { - const { data } = useFetch(`https://data.jsdelivr.com/v1/package/npm/@layui/layui-vue`, { - timeout: 1000 * 2, - initialData: '', - afterFetch: (ctx) => ((ctx.data = ctx.data.tags.latest), ctx) - }).json() + const { data } = useFetch( + `https://data.jsdelivr.com/v1/package/npm/@layui/layui-vue`, + { + timeout: 1000 * 2, + initialData: "", + afterFetch: (ctx) => ((ctx.data = ctx.data.tags.latest), ctx), + } + ).json(); return data; -} \ No newline at end of file +}