perf(ChangeLog): update error alert
This commit is contained in:
parent
e0dd9e64fa
commit
857435b2b1
@ -10,7 +10,7 @@ interface Commit {
|
||||
}
|
||||
}
|
||||
|
||||
const { isFetching, data } = useFetch('https://git.thehrz.net/api/v1/repos/19yuke2-project/19yuke2/commits?stat=false&limit=3').json<Commit[]>()
|
||||
const { isFetching, error, data } = useFetch('https://git.thehrz.net/api/v1/repos/19yuke2-project/19yuke2/commits?stat=false&limit=3').json<Commit[]>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -18,6 +18,14 @@ const { isFetching, data } = useFetch('https://git.thehrz.net/api/v1/repos/19yuk
|
||||
<p v-if="isFetching">
|
||||
Loading...
|
||||
</p>
|
||||
|
||||
<v-alert
|
||||
v-else-if="error"
|
||||
type="error"
|
||||
title="加载错误"
|
||||
text="无法加载ChangeLog,请刷新重试。"
|
||||
/>
|
||||
|
||||
<v-list v-else>
|
||||
<v-list-item
|
||||
v-for="commit in data"
|
||||
|
Loading…
Reference in New Issue
Block a user