chore: 格式化代码
This commit is contained in:
parent
47b6158d78
commit
810b8847f2
@ -1,10 +1,13 @@
|
|||||||
import { useFetch } from "@vueuse/core";
|
import { useFetch } from "@vueuse/core";
|
||||||
|
|
||||||
export function getLayuiVueVersion() {
|
export function getLayuiVueVersion() {
|
||||||
const { data } = useFetch(`https://data.jsdelivr.com/v1/package/npm/@layui/layui-vue`, {
|
const { data } = useFetch(
|
||||||
timeout: 1000 * 2,
|
`https://data.jsdelivr.com/v1/package/npm/@layui/layui-vue`,
|
||||||
initialData: '',
|
{
|
||||||
afterFetch: (ctx) => ((ctx.data = ctx.data.tags.latest), ctx)
|
timeout: 1000 * 2,
|
||||||
}).json()
|
initialData: "",
|
||||||
|
afterFetch: (ctx) => ((ctx.data = ctx.data.tags.latest), ctx),
|
||||||
|
}
|
||||||
|
).json();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user