chore: 格式化代码

This commit is contained in:
sight 2022-03-31 03:48:13 +08:00
parent 47b6158d78
commit 810b8847f2

View File

@ -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;
}
}